### Question:
Polygon { public void reset() { xpoints = new double[MIN_POINTS]; ypoints = new double[MIN_POINTS]; npoints = 0; bounds.set(0.0, 0.0, 0.0, 0.0); } 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 testReset() { final Polygon polygon = new Polygon(); polygon.addPoint(1.0, 2.0); polygon.addPoint(3.0, 4.0); assertFalse(polygon.getPoints().isEmpty()); assertEquals(new Rectangle(0.0, 0.0, 0.0, 0.0), polygon.getArea()); polygon.reset(); assertTrue(polygon.getPoints().isEmpty()); assertEquals(new Rectangle(0.0, 0.0, 0.0, 0.0), polygon.getArea()); }