### Question:
TemporaryArcView extends JComponent { public void addIntermediatePoint(ArcPoint point) { intermediatePoints.add(point); updateMax(point.getPoint()); updateBounds(); } TemporaryArcView(T source, ArcHead arcHead); void setEnd(Point2D end); void addIntermediatePoint(ArcPoint point); T getSourceConnectable(); @Override void paintComponent(Graphics g); @Override boolean contains(int x, int y); Point2D getLastPoint(); List<ArcPoint> getIntermediatePoints();  }### Answer:
@Test public void updatesBoundsWithArcPoint() { Point2D mouse = new Point2D.Double(300, 300); temporaryArcView.addIntermediatePoint(new ArcPoint(mouse, true)); Rectangle expected = new Rectangle(0, 0, (int) mouse.getX(), (int) mouse.getY()); Rectangle actual = temporaryArcView.getBounds(); assertEquals(expected, actual); }