### Question:
Rectangle implements Area { @Override public boolean contains(Area area) { if (area == null) { return false; } final boolean outside = area.getX() < x || area.getY() < y || area.getX() + area.getWidthReal() > x + width || area.getY() + area.getHeightReal() > y + height; return !outside; } 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 testContains() { final Rectangle rectangle1 = new Rectangle(0.0, 0.0, 10.0, 10.0); final Rectangle rectangle2 = new Rectangle(1.0, 1.0, 5.0, 5.0); final Rectangle rectangle3 = new Rectangle(4.0, 1.0, 5.0, 5.0); final Rectangle rectangle4 = new Rectangle(1.0, 4.0, 5.0, 5.0); final Rectangle rectangle5 = new Rectangle(6.0, 6.0, 5.0, 5.0); assertFalse(rectangle1.contains(null)); assertTrue(rectangle1.contains(rectangle2)); assertFalse(rectangle2.contains(rectangle1)); assertFalse(rectangle2.contains(rectangle3)); assertFalse(rectangle2.contains(rectangle4)); assertFalse(rectangle2.contains(rectangle5)); assertFalse(rectangle4.contains(rectangle3)); assertFalse(rectangle4.contains(rectangle2)); assertTrue(rectangle4.contains(rectangle4)); assertFalse(rectangle4.contains(rectangle5)); assertTrue(rectangle1.contains(2, 3)); assertFalse(rectangle1.contains(-2, -3)); assertFalse(rectangle1.contains(-1, 11)); assertFalse(rectangle1.contains(0, 11)); assertFalse(rectangle1.contains(-1, 10)); assertFalse(rectangle1.contains(11, 12)); assertFalse(rectangle1.contains(11, -3)); }