ShapeSymbol implements Symbol { @Override public Rectangle2D getBounds() { return shape.getBounds2D(); } ShapeSymbol(Shape shape); static ShapeSymbol createCircle(double size); static ShapeSymbol createSquare(double size); static ShapeSymbol createPin(double size); Shape getShape(); @Override void draw(Rendering rendering, FigureStyle style); @Override boolean isHitBy(double x, double y); @Override Rectangle2D getBounds();  }
@Test public void testGetBounds() throws Exception { ShapeSymbol shapeSymbol = ShapeSymbol.createCircle(10.0); assertEquals(new Rectangle2D.Double(-5, -5, 10, 10), shapeSymbol.getBounds()); }