### Question:
Line { @Override public int hashCode() { final int prime = 31; int result = 1; long temp; temp = Double.doubleToLongBits(x1); result = prime * result + (int) (temp ^ temp >>> 32); temp = Double.doubleToLongBits(y1); result = prime * result + (int) (temp ^ temp >>> 32); temp = Double.doubleToLongBits(x2); result = prime * result + (int) (temp ^ temp >>> 32); temp = Double.doubleToLongBits(y2); result = prime * result + (int) (temp ^ temp >>> 32); return result; } Line();  Line(double x1, double y1, double x2, double y2); void set(double x1, double y1, double x2, double y2); double getX1(); double getX2(); double getY1(); double getY2(); @Override int hashCode(); @Override boolean equals(Object object); @Override String toString();  }### Answer:
@Test void testHashCode() { assertHashEquals(new Line(), new Line()); assertHashEquals(new Line(1.5, 2.5, 3.5, 4.5), new Line(1.5, 2.5, 3.5, 4.5)); assertHashNotEquals(new Line(), new Object()); assertHashNotEquals(new Line(1.5, 2.5, 3.5, 4.5), new Line(2.5, 2.5, 3.5, 4.5)); assertHashNotEquals(new Line(1.5, 2.5, 3.5, 4.5), new Line(1.5, 1.5, 3.5, 4.5)); assertHashNotEquals(new Line(1.5, 2.5, 3.5, 4.5), new Line(1.5, 2.5, 2.5, 4.5)); assertHashNotEquals(new Line(1.5, 2.5, 3.5, 4.5), new Line(1.5, 2.5, 3.5, 1.5)); }