StyledLayerDescriptor sld = new NamedLayerBuilder().name("states").style()
.name("population").buildSLD();
// print(sld);
StyleCollector collector = new StyleCollector();
sld.accept(collector);
assertEquals(0, collector.featureTypeStyles.size());
assertEquals(0, collector.rules.size());
assertEquals(0, collector.symbolizers.size());
assertEquals(1, collector.styles.size());
assertEquals(1, collector.layers.size());