assertEquals(capabilities.getRequest().getGetFeatureInfo().getFormats().get(1), "text/plain");
assertEquals(capabilities.getRequest().getGetFeatureInfo().getFormats().get(2), "text/html");
assertEquals(capabilities.getRequest().getGetFeatureInfo().getFormats().get(3), "text/swf");
assertEquals(capabilities.getRequest().getGetFeatureInfo().getGet(), new URL("http://www2.demis.nl/wms/wms.asp?wms=WorldMap&"));
Layer topLayer = (Layer) capabilities.getLayerList().get(0);
assertNotNull(topLayer);
assertNull(topLayer.getParent());
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");
// Added test to verify inheritance, should be same as previous llbbox
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);
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 = 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);
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);