### Question:
Line { @Override public boolean equals(Object object) { if (this == object) { return true; } if (object == null || object.getClass() != getClass()) { return false; } final Line other = (Line) object; return Double.compare(x1, other.x1) == 0 && Double.compare(y1, other.y1) == 0 && Double.compare(x2, other.x2) == 0 && Double.compare(y2, other.y2) == 0; } 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 testEquals() { final Line coord = new Line(); assertEquals(coord, coord); assertEquals(new Line(), new Line()); assertEquals(new Line(1.5, 2.5, 3.5, 4.5), new Line(1.5, 2.5, 3.5, 4.5)); assertNotEquals(new Line(), null); assertNotEquals(new Line(), new Object()); assertNotEquals(new Line(1.5, 2.5, 3.5, 4.5), new Line(2.5, 2.5, 3.5, 4.5)); assertNotEquals(new Line(1.5, 2.5, 3.5, 4.5), new Line(1.5, 1.5, 3.5, 4.5)); assertNotEquals(new Line(1.5, 2.5, 3.5, 4.5), new Line(1.5, 2.5, 2.5, 4.5)); assertNotEquals(new Line(1.5, 2.5, 3.5, 4.5), new Line(1.5, 2.5, 3.5, 1.5)); }