### Question:
Rectangle implements Area { @Override public boolean equals(Object object) { if (this == object) { return true; } if (object == null || object.getClass() != getClass()) { return false; } final Rectangle other = (Rectangle) object; return Double.compare(x, other.x) == 0 && Double.compare(y, other.y) == 0 && Double.compare(width, other.width) == 0 && Double.compare(height, other.height) == 0; } Rectangle();  Rectangle(double x, double y, double width, double height); void translate(double vx, double vy); void rotate(double angle); void set(double x, double y, double w, double h); double getMinX(); double getMinY(); double getMaxX(); double getMaxY(); @Override boolean intersects(Area area); @Override boolean contains(Area area); @Override boolean contains(double x, double y); @Override double getWidthReal(); @Override double getHeightReal(); @Override double getX(); @Override double getY(); @Override int getWidth(); @Override int getHeight(); @Override int hashCode(); @Override boolean equals(Object object); @Override String toString();  }### Answer:
@Test void testEquals() { final Rectangle rectangle = new Rectangle(0, 1, 2, 3); assertEquals(rectangle, rectangle); assertEquals(rectangle, new Rectangle(0, 1, 2, 3)); assertNotEquals(rectangle, null); assertNotEquals(rectangle, new Object()); assertNotEquals(rectangle, new Rectangle(0, 1, 2, 0)); assertNotEquals(rectangle, new Rectangle(0, 1, 0, 3)); assertNotEquals(rectangle, new Rectangle(0, 1, 0, 0)); assertNotEquals(rectangle, new Rectangle(0, 0, 2, 3)); assertNotEquals(rectangle, new Rectangle(0, 0, 2, 0)); assertNotEquals(rectangle, new Rectangle(0, 0, 0, 0)); assertNotEquals(rectangle, new Rectangle(0, 0, 0, 0)); assertNotEquals(rectangle, new Rectangle(1, 1, 2, 3)); assertNotEquals(rectangle, new Rectangle(0, 1, 2, 0)); assertNotEquals(rectangle, new Rectangle(0, 1, 0, 3)); assertNotEquals(rectangle, new Rectangle(0, 1, 0, 0)); assertNotEquals(rectangle, new Rectangle(0, 0, 2, 3)); assertNotEquals(rectangle, new Rectangle(0, 0, 2, 0)); assertNotEquals(rectangle, new Rectangle(0, 0, 0, 3)); assertNotEquals(rectangle, new Rectangle(1, 0, 0, 0)); }