### Question:
Rectangle implements Area { @Override public int hashCode() { final int prime = 31; int result = 1; long temp; temp = Double.doubleToLongBits(x); result = prime * result + (int) (temp ^ temp >>> 32); temp = Double.doubleToLongBits(y); result = prime * result + (int) (temp ^ temp >>> 32); temp = Double.doubleToLongBits(width); result = prime * result + (int) (temp ^ temp >>> 32); temp = Double.doubleToLongBits(height); result = prime * result + (int) (temp ^ temp >>> 32); return result; } 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 testHashCode() { final Rectangle rectangle = new Rectangle(0, 1, 2, 3); assertHashEquals(rectangle, new Rectangle(0, 1, 2, 3)); assertHashNotEquals(rectangle, new Object()); assertHashNotEquals(rectangle, new Rectangle(0, 1, 2, 0)); assertHashNotEquals(rectangle, new Rectangle(0, 1, 0, 3)); assertHashNotEquals(rectangle, new Rectangle(0, 1, 0, 0)); assertHashNotEquals(rectangle, new Rectangle(0, 0, 2, 3)); assertHashNotEquals(rectangle, new Rectangle(0, 0, 2, 0)); assertHashNotEquals(rectangle, new Rectangle(0, 0, 0, 0)); assertHashNotEquals(rectangle, new Rectangle(0, 0, 0, 0)); assertHashNotEquals(rectangle, new Rectangle(1, 1, 2, 3)); assertHashNotEquals(rectangle, new Rectangle(0, 1, 2, 0)); assertHashNotEquals(rectangle, new Rectangle(0, 1, 0, 3)); assertHashNotEquals(rectangle, new Rectangle(0, 1, 0, 0)); assertHashNotEquals(rectangle, new Rectangle(0, 0, 2, 3)); assertHashNotEquals(rectangle, new Rectangle(0, 0, 2, 0)); assertHashNotEquals(rectangle, new Rectangle(0, 0, 0, 3)); assertHashNotEquals(rectangle, new Rectangle(1, 0, 0, 0)); }