+
+ @Test
+ public void testCreateMeterBandSubTypeSerializerKey() throws Exception {
+ ExperimenterIdSerializerKey<?> createdKey;
+ ExperimenterIdSerializerKey<?> comparationKey1;
+ ExperimenterIdSerializerKey<?> comparationKey2;
+ ExperimenterIdSerializerKey<?> comparationKey3;
+ ExperimenterIdSerializerKey<?> comparationKey4;
+ ExperimenterIdSerializerKey<?> comparationKey5;
+
+ createdKey = ExperimenterSerializerKeyFactory.createMeterBandSerializerKey(
+ EncodeConstants.OF10_VERSION_ID, 43L, ExperimenterMeterBandSubType.class);
+ comparationKey1 = new ExperimenterIdMeterSubTypeSerializerKey<>(EncodeConstants.OF13_VERSION_ID,
+ 43L, MeterBandExperimenterCase.class, ExperimenterMeterBandSubType.class);
+ comparationKey2 = new ExperimenterIdMeterSubTypeSerializerKey<>(EncodeConstants.OF10_VERSION_ID,
+ 42L, MeterBandExperimenterCase.class, ExperimenterMeterBandSubType.class);
+ comparationKey3 = new ExperimenterIdMeterSubTypeSerializerKey<>(EncodeConstants.OF10_VERSION_ID,
+ 43L, null, ExperimenterMeterBandSubType.class);
+ comparationKey4 = new ExperimenterIdMeterSubTypeSerializerKey<>(EncodeConstants.OF10_VERSION_ID,
+ 43L, MeterBandExperimenterCase.class, null);
+ comparationKey5 = new ExperimenterIdMeterSubTypeSerializerKey<>(EncodeConstants.OF10_VERSION_ID,
+ 43L, MeterBandExperimenterCase.class, ExperimenterMeterBandSubType.class);
+ Assert.assertNotEquals("Wrong key created", comparationKey1, createdKey);
+ Assert.assertNotEquals("Wrong key created", comparationKey2, createdKey);
+ Assert.assertNotEquals("Wrong key created", comparationKey3, createdKey);
+ Assert.assertNotEquals("Wrong key created", comparationKey4, createdKey);
+ Assert.assertEquals("Wrong key created", comparationKey5, createdKey);
+ }