### Question:
BoundingBox implements Serializable { public boolean contains(Geometry geometry) { return geometry.getDimension() > 2 ? !(geometry.contains(ll) || geometry.contains(ur)) : asEnvelop().contains(geometry.getEnvelopeInternal()); } @SuppressWarnings("unused") private  BoundingBox();  BoundingBox(Point ll, Point ur, String srs); boolean contains(Geometry geometry); Envelope asEnvelop(); void extendBy(Point point); void setLl(Point ll); void setUr(Point ur); Point getLowerLeft(); Point getUpperRight(); String getSrs(); @Override String toString();  }### Answer:
@Test public void testContainingGeometryIsContained() throws ParseException { Point ll = (Point) createGeometry("POINT (0 0)"); Point ur = (Point) createGeometry("POINT (10 10)"); BoundingBox bbox = new BoundingBox(ll, ur, "EPSG:4326"); Geometry overlappingPolygon = createGeometry("POLYGON ((0 1, 9 0, 3 3, 0 1))"); assertTrue(bbox.contains(overlappingPolygon), "geometry is not contained by bbox"); }
@Test public void testOverlappingGeometryIsNotContained() throws ParseException { Point ll = (Point) createGeometry("POINT (0 0)"); Point ur = (Point) createGeometry("POINT (10 10)"); BoundingBox bbox = new BoundingBox(ll, ur, "EPSG:4326"); Geometry overlappingPolygon = createGeometry("POLYGON ((0 1, 11 0, 3 3, 0 1))"); assertFalse(bbox.contains(overlappingPolygon), "geometry is contained by bbox"); }