public void testHashCodeAndEqualsSameType() throws IOException, ClassNotFoundException {
PdxInstance instance = getAllFields(0);
assertEquals(instance, getAllFields(0));
assertEquals(instance.hashCode(), getAllFields(0).hashCode());
for(int i =1; i < allFieldCount + 1; i++) {
PdxInstance other = getAllFields(i);
assertFalse("One field " + i + " hashcode have been unequal but were equal" + instance.getField("field" + (i-1)) +", " + other.getField("field" + (i-1)) + ", " + instance + ", " + other, instance.equals(other));
assertFalse("One field " + i + " hashcode have been unequal but were equal" + instance +", " + other, instance.hashCode() == other.hashCode());
}
}