### Question:
Polygon { public boolean contains(Area area) { return bounds.contains(area); } Polygon(); void addPoint(double x, double y); void reset(); Area getArea(); boolean intersects(Area area); boolean contains(Area area); Collection<Line> getPoints(); @Override String toString();  }### Answer:
@Test void testContains() { final Polygon polygon = new Polygon(); assertFalse(polygon.contains(null)); assertFalse(polygon.contains(Geom.createArea(1.0, 2.0, 2.0, 2.0))); polygon.addPoint(-1.0, -2.0); polygon.addPoint(-3.0, -4.0); polygon.addPoint(1.0, 2.0); polygon.addPoint(3.0, 4.0); assertFalse(polygon.contains(null)); assertFalse(polygon.contains(Geom.createArea(10.25, 20.25, 0.5, 0.5)), polygon.getArea().toString()); assertTrue(polygon.contains(Geom.createArea(1.25, 2.25, 0.5, 0.5)), polygon.getArea().toString()); }