### Question:
IteratorSetting implements Writable { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((iteratorClass == null) ? 0 : iteratorClass.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + priority; result = prime * result + ((properties == null) ? 0 : properties.hashCode()); return result; } IteratorSetting(int priority, String name, String iteratorClass);  IteratorSetting(int priority, String name, String iteratorClass,
      Map<String,String> properties);  IteratorSetting(int priority,
      Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass);  IteratorSetting(int priority,
      Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass,
      Map<String,String> properties);  IteratorSetting(int priority, String name,
      Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass);  IteratorSetting(int priority, String name,
      Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass,
      Map<String,String> properties);  IteratorSetting(DataInput din); int getPriority(); void setPriority(int priority); String getName(); void setName(String name); String getIteratorClass(); void setIteratorClass(String iteratorClass); void addOption(String option, String value); String removeOption(String option); void addOptions(Set<Entry<String,String>> propertyEntries); void addOptions(Map<String,String> properties); Map<String,String> getOptions(); void clearOptions(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); @Override void readFields(DataInput din); @Override void write(DataOutput dout);  }### Answer:
@Test public final void testHashCodeSameObject() { assertEquals(setting1.hashCode(), setting1.hashCode()); }
@Test public final void testHashCodeEqualObjects() { assertEquals(setting1.hashCode(), setting2.hashCode()); }