}
public void testCascadeStyle() {
String styleName = MockData.LAKES.getLocalPart();
String layerName = getLayerId(MockData.LAKES);
StyleInfo style = catalog.getStyleByName(styleName);
assertNotNull(style);
// add the lakes style to builds as an alternate style
LayerInfo buildings = catalog.getLayerByName(getLayerId(MockData.BUILDINGS));
buildings.getStyles().add(style);
catalog.save(buildings);
buildings = catalog.getLayerByName(getLayerId(MockData.BUILDINGS));
assertTrue(buildings.getStyles().contains(style));
style.accept(visitor);
// test style reset
assertNull(catalog.getStyleByName(styleName));
assertEquals(StyleInfo.DEFAULT_POLYGON, catalog.getLayerByName(layerName).getDefaultStyle().getName());