@Test
public void testShapeOf() throws Exception {

    List<Point2D> points = Arrays.<Point2D> asList(new Point2D.Double(-5d, -5d), new Point2D.Double(-5d, 5d),
            new Point2D.Double(5d, 5d), new Point2D.Double(5d, -5d));
    Rectangle2D bounds = ConvexHull.shapeOf(points).getBounds2D();
    assertThat(bounds.getMinX(), closeTo(-5, 0.01));
    assertThat(bounds.getMinY(), closeTo(-5, 0.01));
    assertThat(bounds.getMaxX(), closeTo(5, 0.01));
    assertThat(bounds.getMaxY(), closeTo(5, 0.01));
}