private void testMarshaling(GeoServerTileLayerInfo info) { XStream xstream = XMLConfiguration.getConfiguredXStream(new XStream(), null); xstream = new GWCGeoServerConfigurationProvider().getConfiguredXStream(xstream); String marshalled = xstream.toXML(info); GeoServerTileLayerInfo unmarshalled = (GeoServerTileLayerInfo) xstream .fromXML(new StringReader(marshalled)); assertNotNull(unmarshalled); assertEquals("enabled", info.isEnabled(), unmarshalled.isEnabled()); assertEquals("autoCacheStyles", info.isAutoCacheStyles(), unmarshalled.isAutoCacheStyles()); assertEquals("gutter", info.getGutter(), unmarshalled.getGutter()); assertEquals("metaTilingX", info.getMetaTilingX(), unmarshalled.getMetaTilingX()); assertEquals("metaTilingY", info.getMetaTilingY(), unmarshalled.getMetaTilingY()); assertEquals("cachedStyles", info.cachedStyles(), unmarshalled.cachedStyles()); assertEquals("gridSubsets", info.getGridSubsets(), unmarshalled.getGridSubsets()); assertEquals("mimeFormats", info.getMimeFormats(), unmarshalled.getMimeFormats()); assertCollection("parameterFilters", info.getParameterFilters(), unmarshalled.getParameterFilters()); assertEquals("info", info, unmarshalled); }