Point implements Comparable<Point> { @Override public int hashCode() { return (int) (((13 * this.x) + this.y) * 17); } Point(double x, double y);  Point(Point point);  Point(String point); double getX(); double getY(); double distance(Point point); void moveToward(Point point, double distance); void pathToward(Point destination, double distance); boolean nextStep(Point point, double distance); @Override String toString(); String toNeatString(); @Override boolean equals(Object object); boolean lazyEquals(Object object); @Override int hashCode(); @Override int compareTo(Point point);  }
@Test public void hashCodeTest() { Assert.assertEquals("Hashcode equality error (PT1 == PT4).", testPoint1.hashCode(), testPoint4.hashCode()); Assert.assertEquals("Hashcode equality error (PT2 == PT3).", testPoint2.hashCode(), testPoint3.hashCode()); Assert.assertNotEquals("Hashcode equality error (PT1 != PT2).", testPoint1.hashCode(), testPoint2.hashCode()); Assert.assertNotEquals("Hashcode equality error (PT3 != PT4).", testPoint3.hashCode(), testPoint4.hashCode()); }