EnumId implements DataSerializableFixedID { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + id; return result; } EnumId(int id);  EnumId(); @Override int getDSFID(); @Override void toData(DataOutput out,
      SerializationContext context); @Override void fromData(DataInput in,
      DeserializationContext context); int intValue(); int getDSId(); int getEnumNum(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); @Override KnownVersion[] getSerializationVersions();  }
@Test public void testHashCode() { final EnumId enumId = new EnumId(ID); assertEquals(enumId.hashCode(), enumId.hashCode()); final EnumId sameId = new EnumId(ID); assertEquals(enumId.hashCode(), sameId.hashCode()); final EnumId differentId = new EnumId(ID + 1); assertNotEquals(enumId.hashCode(), differentId.hashCode()); }