PointHandle extends AbstractHandle { @Override public void move(double dx, double dy) { setLocation(getX() + dx, getY() + dy); getFigure().setLocation(getLocation()); } PointHandle(PointFigure figure, FigureStyle handleStyle);  PointHandle(PointFigure figure, FigureStyle handleStyle, Shape shape); @Override PointFigure getFigure(); @Override void updateLocation(); @Override void move(double dx, double dy);  }
@Test public void testMove() throws Exception { handle.move(1.5, -2.2); assertEquals(new Point2D.Double(1.5, -2.2), handle.getLocation()); assertEquals(new Point2D.Double(1.5, -2.2), figure.getLocation()); }