assertNull(capabilities.getRequest().getGetFeatureInfo());
assertEquals(capabilities.getLayerList().size(), 4);
Layer layer = (Layer) capabilities.getLayerList().get(0);
assertNotNull(layer);
assertNull(layer.getName());
assertEquals(layer.getTitle(), "Microsoft TerraServer Map Server");
assertEquals(layer.getSrs().size(), 1);
assertTrue(layer.getSrs().contains("EPSG:4326" ));
validateBoundingBox(layer.getLatLonBoundingBox(),
-168.67, 17.84, -65.15, 71.55);
assertNull(layer.getParent());
assertEquals(layer.getBoundingBoxes().size(), 0);
assertEquals(layer.getStyles().size(), 0);
layer = (Layer) capabilities.getLayerList().get(1);
assertEquals(layer.getName(), "DOQ");
assertEquals(layer.getTitle(), "USGS Digital Ortho-Quadrangles");
// changed expected to 14 to account for inherited srs
assertEquals(layer.getSrs().size(), 14);
// Added additional check to test for inherited srs
assertTrue(layer.getSrs().contains("EPSG:4326"));
assertTrue(layer.getSrs().contains("EPSG:26905"));
assertTrue(layer.getSrs().contains("EPSG:26920"));
assertEquals(layer.getBoundingBoxes().size(), 13);
CRSEnvelope bbox = (CRSEnvelope) layer.getBoundingBoxes().get("EPSG:26905");
assertNotNull(bbox);
assertEquals(bbox.getEPSGCode(), "EPSG:26905");
assertEquals(bbox.getMinX(), 552600.0, 0.0);
assertEquals(bbox.getMinY(), 6540200.0, 0.0);
assertEquals(bbox.getMaxX(), 670200.0, 0.0);
assertEquals(bbox.getMaxY(), 6794800.0, 0.0);
assertEquals(10, layer.getScaleHintMin(), 0);
assertEquals(10000, layer.getScaleHintMax(), 0);
bbox = (CRSEnvelope) layer.getBoundingBoxes().get("EPSG:26920");
assertNotNull(bbox);
assertEquals(bbox.getEPSGCode(), "EPSG:26920");
assertEquals(bbox.getMinX(), 181800.0, 0.0);
assertEquals(bbox.getMinY(), 1985200.0, 0.0);
assertEquals(bbox.getMaxX(), 269400.0, 0.0);
assertEquals(bbox.getMaxY(), 2048600.0, 0.0);
// Changed expected value, no duplicates allowed by spec
assertEquals(layer.getStyles().size(), 18);
assertTrue(layer.getStyles().contains(new StyleImpl("UTMGrid")));
assertTrue(layer.getStyles().contains(new StyleImpl("GeoGrid_Cyan")));
assertTrue(layer.getStyles().contains(new StyleImpl("GeoGrid_Black")));
assertTrue(layer.getStyles().contains(new StyleImpl("GeoGrid_Gray")));
assertTrue(layer.getStyles().contains(new StyleImpl("GeoGrid_White")));
StyleImpl utmGrid = (StyleImpl) layer.getStyles().get(0);
assertEquals(utmGrid.getName(), "UTMGrid");
assertEquals(utmGrid.getAbstract().toString(), "Display grid lines in Goldenrod on the DOQ image");
assertEquals(utmGrid.getTitle().toString(), "Goldedrod Grid Lines on UTM coordinates");
assertFalse(layer.isQueryable());
// Added test to verify inheritance, should be same as previous llbbox
validateBoundingBox(layer.getLatLonBoundingBox(),
-168.67, 17.84, -65.15, 71.55);
layer = (Layer) capabilities.getLayerList().get(2);
assertNotNull(layer);
assertEquals(layer.getName(), "DRG");
assertEquals(layer.getTitle(), "USGS Raster Graphics (Topo Maps)");
// Added test to verify inheritance, should be same as previous llbbox
validateBoundingBox(layer.getLatLonBoundingBox(),
-168.67, 17.84, -65.15, 71.55);
assertEquals(50, layer.getScaleHintMin(), 0);
layer = (Layer) capabilities.getLayerList().get(3);
assertNotNull(layer);
assertEquals(layer.getName(), "UrbanArea");
assertEquals(layer.getTitle(), "USGS Urban Areas Ortho-Imagery");
// Added test to verify inheritance, should be same as previous llbbox
validateBoundingBox(layer.getLatLonBoundingBox(),
-168.67, 17.84, -65.15, 71.55);
assertEquals(50000, layer.getScaleHintMax(), 0);
} catch(java.net.ConnectException ce){
if(ce.getMessage().indexOf("timed out")>0){
System.err.println("Unable to test - timed out: "+ce);
} else{