### Question:
GeometryCalculator { public List<AbstractTileGeometry<?>> getContainingGeometries(Collection<? extends AbstractTileGeometry<?>> geometries, GeographicBoundingBox boundingBox) { List<AbstractTileGeometry<?>> containingGeometries = New.list(); for (AbstractTileGeometry<?> geometry : geometries) { if (overlaps(geometry, boundingBox)) { containingGeometries.add(geometry); } } return containingGeometries; }  boolean anyAtFullContainment(Collection<? extends AbstractTileGeometry<?>> geometries, GeographicBoundingBox boundingBox); List<AbstractTileGeometry<?>> getContainingGeometries(Collection<? extends AbstractTileGeometry<?>> geometries, GeographicBoundingBox boundingBox); static boolean overlaps(AbstractTileGeometry<?> geometry, GeographicBoundingBox boundingBox);  }### Answer:
@Test public void testGetContainingGeometries() { EasyMockSupport support = new EasyMockSupport(); TileRenderProperties props = support.createNiceMock(TileRenderProperties.class); support.replayAll(); GeographicBoundingBox boundingBox = new GeographicBoundingBox(LatLonAlt.createFromDegrees(0, 0), LatLonAlt.createFromDegrees(10, 10)); GeographicBoundingBox outside = new GeographicBoundingBox(LatLonAlt.createFromDegrees(5, -5), LatLonAlt.createFromDegrees(10, -.0001)); GeographicBoundingBox intersects = new GeographicBoundingBox(LatLonAlt.createFromDegrees(5, -5), LatLonAlt.createFromDegrees(10, 15)); GeographicBoundingBox contained = new GeographicBoundingBox(LatLonAlt.createFromDegrees(2, 2), LatLonAlt.createFromDegrees(7, 7)); GeographicBoundingBox overlapping = new GeographicBoundingBox(LatLonAlt.createFromDegrees(-10, -10), LatLonAlt.createFromDegrees(15, 15)); TileGeometry.Builder<GeographicPosition> builder = new Builder<>(); builder.setBounds(outside); TileGeometry outSideGeom = new TileGeometry(builder, props, null); builder = new Builder<>(); builder.setBounds(intersects); TileGeometry intersectsGeom = new TileGeometry(builder, props, null); builder = new Builder<>(); builder.setBounds(contained); TileGeometry containedGeom = new TileGeometry(builder, props, null); builder = new Builder<>(); builder.setBounds(overlapping); TileGeometry overlappingGeom = new TileGeometry(builder, props, null); List<AbstractTileGeometry<?>> geoms = New.list(outSideGeom, intersectsGeom, containedGeom, overlappingGeom); GeometryCalculator calc = new GeometryCalculator(); List<AbstractTileGeometry<?>> viewable = calc.getContainingGeometries(geoms, boundingBox); assertEquals(3, viewable.size()); assertTrue(viewable.contains(intersectsGeom)); assertTrue(viewable.contains(containedGeom)); assertTrue(viewable.contains(overlappingGeom)); support.verifyAll(); }