### Question:
InstructionDeserializerKey extends MessageCodeKey { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (!(obj instanceof InstructionDeserializerKey)) { return false; } InstructionDeserializerKey other = (InstructionDeserializerKey) obj; if (experimenterId == null) { if (other.experimenterId != null) { return false; } } else if (!experimenterId.equals(other.experimenterId)) { return false; } return true; } InstructionDeserializerKey(short version, int type,
            Long experimenterId); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void testEquals(){ InstructionDeserializerKey key1 = new InstructionDeserializerKey(EncodeConstants.OF10_VERSION_ID, 11, null); InstructionDeserializerKey key2 = new InstructionDeserializerKey(EncodeConstants.OF10_VERSION_ID, 11, 24L); Assert.assertTrue("Wrong equal to identical object.", key1.equals(key1)); Assert.assertFalse("Wrong equal to different class.", key1.equals(new Object())); Assert.assertFalse("Wrong equal by experimenterId", key1.equals(key2)); key2 = new InstructionDeserializerKey(EncodeConstants.OF10_VERSION_ID, 11, null); Assert.assertTrue("Wrong equal by experimenterId", key1.equals(key2)); }