/**
* Test method for {@link org.gedcom4j.model.Gedcom#hashCode()}.
*/
@Test
public void testHashCode() {
Gedcom g1 = new Gedcom();
Gedcom g2 = new Gedcom();
assertEquals("objects are equal, so hashcodes should equal",
g1.hashCode(), g2.hashCode());
g1.trailer = null;
assertFalse(
"objects are no longer equal, so hashcodes should no longer equal",
g1.hashCode() == g2.hashCode());
g2.trailer = null;
assertEquals(
"objects are equal again, so hashcodes should equal again",
g1.hashCode(), g2.hashCode());
g1.individuals.put("FryingPan", new Individual());
assertFalse(
"objects are no longer equal, so hashcodes should no longer equal",
g1.hashCode() == g2.hashCode());
g2.individuals.put("FryingPan", new Individual());
assertEquals(
"objects are equal again, so hashcodes should equal again",
g1.hashCode(), g2.hashCode());
}