### Question:
FunctionalDependency implements Result { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((dependant == null) ? 0 : dependant.hashCode()); result = prime * result + ((determinant == null) ? 0 : determinant.hashCode()); return result; } FunctionalDependency();  FunctionalDependency(ColumnCombination determinant,
                              ColumnIdentifier dependant); ColumnCombination getDeterminant(); void setDependant(ColumnIdentifier dependant); ColumnIdentifier getDependant(); void setDeterminant(ColumnCombination determinant); @Override @XmlTransient void sendResultTo(OmniscientResultReceiver resultReceiver); @Override String toString(); String toString(Map<String, String> tableMapping, Map<String, String> columnMapping); static FunctionalDependency fromString(Map<String, String> tableMapping, Map<String, String> columnMapping, String str); @Override int hashCode(); @Override boolean equals(Object obj); static final String FD_SEPARATOR; }### Answer:
@Test public void testEqualsHashCode() { FunctionalDependency expectedFd = new FunctionalDependency( new ColumnCombination( new ColumnIdentifier("table1", "column2")), new ColumnIdentifier("table1", "column47") ); FunctionalDependency expectedEqualFd = new FunctionalDependency( new ColumnCombination( new ColumnIdentifier("table1", "column2")), new ColumnIdentifier("table1", "column47") ); FunctionalDependency expectedNotEqualDeterminantFd = new FunctionalDependency( new ColumnCombination( new ColumnIdentifier("table1", "column4")), new ColumnIdentifier("table1", "column47") ); FunctionalDependency expectedNotEqualDependantFd = new FunctionalDependency( new ColumnCombination( new ColumnIdentifier("table1", "column2")), new ColumnIdentifier("table1", "column57") ); assertEquals(expectedFd, expectedFd); assertEquals(expectedFd.hashCode(), expectedFd.hashCode()); assertNotSame(expectedFd, expectedEqualFd); assertEquals(expectedFd, expectedEqualFd); assertEquals(expectedFd.hashCode(), expectedEqualFd.hashCode()); assertNotEquals(expectedFd, expectedNotEqualDeterminantFd); assertNotEquals(expectedFd.hashCode(), expectedNotEqualDeterminantFd.hashCode()); assertNotEquals(expectedFd, expectedNotEqualDependantFd); assertNotEquals(expectedFd.hashCode(), expectedNotEqualDependantFd.hashCode()); }