### Question:
MatchEntryDeserializerKey extends MessageCodeKey implements ExperimenterDeserializerKey { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } MatchEntryDeserializerKey other = (MatchEntryDeserializerKey) obj; if (experimenterId == null) { if (other.experimenterId != null) { return false; } } else if (!experimenterId.equals(other.experimenterId)) { return false; } if (oxmField != other.oxmField) { return false; } return true; } MatchEntryDeserializerKey(short version,
            int oxmClass, int oxmField); void setExperimenterId(Long experimenterId); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void testEquals() { MatchEntryDeserializerKey key1 = new MatchEntryDeserializerKey(EncodeConstants.OF10_VERSION_ID, 0x8000, 42); MatchEntryDeserializerKey key2 = new MatchEntryDeserializerKey(EncodeConstants.OF10_VERSION_ID, 0x8000, 42); Assert.assertTrue("Wrong equal to identical object.", key1.equals(key1)); Assert.assertFalse("Wrong equal to different class.", key1.equals(new Object())); Long expId1=123456L; Long expId2=654321L; key1.setExperimenterId(null); key2.setExperimenterId(expId2); Assert.assertFalse("Wrong equal by experimeterId.", key1.equals(key2)); key1.setExperimenterId(expId1); Assert.assertFalse("Wrong equal by experimeterId.", key1.equals(key2)); Assert.assertFalse("Wrong equals with different object class", key1.equals(key2)); }