EnumInfo implements DataSerializableFixedID { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((clazz == null) ? 0 : clazz.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); return result; } EnumInfo(Enum<?> e);  EnumInfo(String clazz, String name, int enumOrdinal);  EnumInfo(); @Override int getDSFID(); String getClassName(); void setClassName(String v); @Override void toData(DataOutput out,
      SerializationContext context); @Override void fromData(DataInput in,
      DeserializationContext context); void flushCache(); int compareTo(EnumInfo other); Enum<?> getEnum(); int getOrdinal(); @Override int hashCode(); @Override String toString(); String toFormattedString(); @Override boolean equals(Object obj); PdxInstance getPdxInstance(int enumId); @Override KnownVersion[] getSerializationVersions(); void toStream(PrintStream printStream);  }
@Test public void testHashCode() { final EnumInfo enumInfo = new EnumInfo(TestEnum.ONE); assertEquals(enumInfo.hashCode(), enumInfo.hashCode()); final EnumInfo sameClazzAndSameName = new EnumInfo("org.apache.geode.pdx.internal.EnumInfoTest$TestEnum", "ONE", 1); assertEquals(enumInfo.hashCode(), sameClazzAndSameName.hashCode()); final EnumInfo differentClazzAndSameName = new EnumInfo("Not " + "org.apache.geode.pdx.internal.EnumInfoTest$TestEnum", "ONE", 1); assertNotEquals(enumInfo.hashCode(), differentClazzAndSameName.hashCode()); final EnumInfo sameClazzAndDifferentName = new EnumInfo("org.apache.geode.pdx.internal.EnumInfoTest$TestEnum", "Not " + "ONE", 1); assertNotEquals(enumInfo.hashCode(), sameClazzAndDifferentName.hashCode()); }