assertFalse(topLayer.isQueryable());
assertEquals(topLayer.getTitle(), "World Map");
assertEquals(topLayer.getSrs().size(), 1);
assertTrue(topLayer.getSrs().contains("CRS:84"));
CRSEnvelope llbbox = topLayer.getLatLonBoundingBox();
assertNotNull(llbbox);
assertEquals(llbbox.getMinX(), -180, 0.0);
assertEquals(llbbox.getMaxX(), 180, 0.0);
assertEquals(llbbox.getMinY(), -90, 0.0);
assertEquals(llbbox.getMaxY(), 90, 0.0);
assertEquals(topLayer.getBoundingBoxes().size(), 1);
CRSEnvelope bbox = (CRSEnvelope) topLayer.getBoundingBoxes().get("CRS:84");
assertNotNull(bbox);
assertEquals(bbox.getEPSGCode(), "CRS:84");
assertEquals(bbox.getMinX(), -184, 0.0);
assertEquals(bbox.getMaxX(), 180, 0.0);
assertEquals(bbox.getMinY(), -90.0000000017335, 0.0);
assertEquals(bbox.getMaxY(), 90, 0.0);
Layer layer = (Layer) capabilities.getLayerList().get(1);
assertEquals(layer.getParent(), topLayer);
assertTrue(layer.isQueryable());
assertEquals(layer.getName(), "Bathymetry");
assertEquals(layer.getTitle(), "Bathymetry");
assertEquals(layer.getMetadataURL().get(0).getUrl().toString(), "http://www.example.com/?");
assertEquals(layer.getMetadataURL().get(0).getFormat(), "text/html");
assertEquals(layer.getMetadataURL().get(0).getType(), "FGDC");
assertEquals(layer.getStyles().get(0).getLegendURLs().get(0), "http://www.osgeo.org/sites/all/themes/osgeo/logo.png");
// Added test to verify inheritance, should be same as previous llbbox
llbbox = layer.getLatLonBoundingBox();
assertNotNull(llbbox);
assertEquals(llbbox.getMinX(), -180, 0.0);
assertEquals(llbbox.getMaxX(), 180, 0.0);
assertEquals(llbbox.getMinY(), -90, 0.0);
assertEquals(llbbox.getMaxY(), 90, 0.0);
bbox = (CRSEnvelope) layer.getBoundingBoxes().get("CRS:84");
assertNotNull(bbox);
assertEquals(bbox.getEPSGCode(), "CRS:84");
assertEquals(bbox.getMinX(), -180, 0.0);
assertEquals(bbox.getMaxX(), 180, 0.0);
assertEquals(bbox.getMinY(), -90, 0.0);
assertEquals(bbox.getMaxY(), 90, 0.0);
assertEquals(capabilities.getLayerList().size(), 21);
layer = (Layer) capabilities.getLayerList().get(20);
assertEquals(layer.getParent(), topLayer);
assertTrue(layer.isQueryable());
assertEquals(layer.getName(), "Ocean features");
assertEquals(layer.getTitle(), "Ocean features");
// Added test to verify inheritance, should be same as previous llbbox
llbbox = layer.getLatLonBoundingBox();
assertNotNull(llbbox);
assertEquals(llbbox.getMinX(), -180, 0.0);
assertEquals(llbbox.getMaxX(), 180, 0.0);
assertEquals(llbbox.getMinY(), -90, 0.0);
assertEquals(llbbox.getMaxY(), 90, 0.0);
bbox = (CRSEnvelope) layer.getBoundingBoxes().get("CRS:84");
assertNotNull(bbox);
assertEquals(bbox.getEPSGCode(), "CRS:84");
assertEquals(bbox.getMinX(), -180, 0.0);
assertEquals(bbox.getMaxX(), 179.999420166016, 0.0);
assertEquals(bbox.getMinY(), -62.9231796264648, 0.0);
assertEquals(bbox.getMaxY(), 68.6906585693359, 0.0);
}