@Test public void getFeatureType() throws Exception { String url = "/geoserver/rest/workspaces/topp/datastores/taz_shapes/featuretypes/tasmania_cities.xml"; whenHttp(server) .match(get(url)) .then(stringContent(getResourceString("featuretype.xml")), status(HttpStatus.OK_200)); Geoserver geoserver = new Geoserver("http://00.0.0.0:8888/geoserver", "admin", "geoserver"); FeatureTypeCommands commands = new FeatureTypeCommands(); commands.setGeoserver(geoserver); String actual = commands.get("topp", "taz_shapes", "tasmania_cities"); String expected = "tasmania_cities" + OsUtils.LINE_SEPARATOR + " Native Name: tasmania_cities" + OsUtils.LINE_SEPARATOR + " Title: Tasmania cities" + OsUtils.LINE_SEPARATOR + " Description: null" + OsUtils.LINE_SEPARATOR + " Enabled: true" + OsUtils.LINE_SEPARATOR + " Advertised: null" + OsUtils.LINE_SEPARATOR + " Namespace: topp" + OsUtils.LINE_SEPARATOR + " Keywords: " + OsUtils.LINE_SEPARATOR + " cities" + OsUtils.LINE_SEPARATOR + " Tasmania" + OsUtils.LINE_SEPARATOR + " Native CRS: " + OsUtils.LINE_SEPARATOR + " GEOGCS[\"GCS_WGS_1984\", DATUM[\"WGS_1984\", SPHEROID[\"WGS_1984\", 6378137.0, 298.257223563]], PRIMEM[\"Greenwich\"," + OsUtils.LINE_SEPARATOR + " 0.0], UNIT[\"degree\", 0.017453292519943295], AXIS[\"Longitude\", EAST], AXIS[\"Latitude\", NORTH]]" + OsUtils.LINE_SEPARATOR + " " + OsUtils.LINE_SEPARATOR + " SRS: EPSG:4326" + OsUtils.LINE_SEPARATOR + " Projection Policy: FORCE_DECLARED" + OsUtils.LINE_SEPARATOR + " Native Bounding Box: 145.19754,-43.423512,148.27298000000002,-40.852802 EPSG:4326" + OsUtils.LINE_SEPARATOR + " LatLon Bounding Box: 145.19754,-43.423512,148.27298000000002,-40.852802 EPSG:4326" + OsUtils.LINE_SEPARATOR + " Metadata: " + OsUtils.LINE_SEPARATOR + " indexingEnabled = false" + OsUtils.LINE_SEPARATOR + " cacheAgeMax = 3600" + OsUtils.LINE_SEPARATOR + " cachingEnabled = true" + OsUtils.LINE_SEPARATOR + " dirName = tasmania_cities" + OsUtils.LINE_SEPARATOR + " kml.regionateFeatureLimit = 10" + OsUtils.LINE_SEPARATOR + " Store: taz_shapes" + OsUtils.LINE_SEPARATOR + " Max Features: 0" + OsUtils.LINE_SEPARATOR + " numDecimals: 0" + OsUtils.LINE_SEPARATOR + " Attributes: " + OsUtils.LINE_SEPARATOR + " the_geom" + OsUtils.LINE_SEPARATOR + " Binding: com.vividsolutions.jts.geom.MultiPoint" + OsUtils.LINE_SEPARATOR + " Min Occurs: 0" + OsUtils.LINE_SEPARATOR + " Max Occurs: 1" + OsUtils.LINE_SEPARATOR + " Nillable: true" + OsUtils.LINE_SEPARATOR + " CITY_NAME" + OsUtils.LINE_SEPARATOR + " Binding: java.lang.String" + OsUtils.LINE_SEPARATOR + " Min Occurs: 0" + OsUtils.LINE_SEPARATOR + " Max Occurs: 1" + OsUtils.LINE_SEPARATOR + " Nillable: true" + OsUtils.LINE_SEPARATOR + " Length: 40" + OsUtils.LINE_SEPARATOR + " ADMIN_NAME" + OsUtils.LINE_SEPARATOR + " Binding: java.lang.String" + OsUtils.LINE_SEPARATOR + " Min Occurs: 0" + OsUtils.LINE_SEPARATOR + " Max Occurs: 1" + OsUtils.LINE_SEPARATOR + " Nillable: true" + OsUtils.LINE_SEPARATOR + " Length: 42" + OsUtils.LINE_SEPARATOR + " CNTRY_NAME" + OsUtils.LINE_SEPARATOR + " Binding: java.lang.String" + OsUtils.LINE_SEPARATOR + " Min Occurs: 0" + OsUtils.LINE_SEPARATOR + " Max Occurs: 1" + OsUtils.LINE_SEPARATOR + " Nillable: true" + OsUtils.LINE_SEPARATOR + " Length: 40" + OsUtils.LINE_SEPARATOR + " STATUS" + OsUtils.LINE_SEPARATOR + " Binding: java.lang.String" + OsUtils.LINE_SEPARATOR + " Min Occurs: 0" + OsUtils.LINE_SEPARATOR + " Max Occurs: 1" + OsUtils.LINE_SEPARATOR + " Nillable: true" + OsUtils.LINE_SEPARATOR + " Length: 50" + OsUtils.LINE_SEPARATOR + " POP_CLASS" + OsUtils.LINE_SEPARATOR + " Binding: java.lang.String" + OsUtils.LINE_SEPARATOR + " Min Occurs: 0" + OsUtils.LINE_SEPARATOR + " Max Occurs: 1" + OsUtils.LINE_SEPARATOR + " Nillable: true" + OsUtils.LINE_SEPARATOR + " Length: 22" + OsUtils.LINE_SEPARATOR; assertStringsEquals(expected, actual, true); verifyHttp(server).once(method(Method.GET), uri(url)); }