Correctly overridden hashCode and equals functions for databases. New JUnit tests added.