use of org.opendaylight.openflowjava.protocol.api.keys.ExperimenterIdTypeDeserializerKey in project openflowplugin by opendaylight.
the class ExperimenterIdTypeDeserializerKeyTest method testEquals.
/**
* Test ExperimenterIdTypeDeserializerKey equals - additional test.
*/
@Test
public void testEquals() {
ExperimenterIdTypeDeserializerKey key1 = new ExperimenterIdTypeDeserializerKey(EncodeConstants.OF10_VERSION_ID, 41L, 1L, ExperimenterMessage.class);
Assert.assertTrue("Wrong equal to identical object.", key1.equals(key1));
ExperimenterIdSerializerKey<?> mk = new ExperimenterIdSerializerKey<>(EncodeConstants.OF10_VERSION_ID, 42L, ExperimenterMessage.class);
Assert.assertFalse("Wrong equal to different class.", key1.equals(mk));
ExperimenterIdTypeDeserializerKey key2 = new ExperimenterIdTypeDeserializerKey(EncodeConstants.OF10_VERSION_ID, 42L, 1L, ExperimenterMessage.class);
Assert.assertFalse("Wrong equal by experimenterId.", key1.equals(key2));
ExperimenterIdTypeDeserializerKey key3 = new ExperimenterIdTypeDeserializerKey(EncodeConstants.OF10_VERSION_ID, 41L, 2L, ExperimenterMessage.class);
Assert.assertFalse("Wrong equal by type.", key1.equals(key3));
}
Aggregations