public void testLabelsAndGeometries() throws IOException{
VectorLayerRasterizingInfo vectorLayerRasterizingInfo = new VectorLayerRasterizingInfo();
vectorLayerRasterizingInfo.setPaintGeometries(true);
vectorLayerRasterizingInfo.setPaintLabels(true);
RasterizingStyleVisitor visitor = new RasterizingStyleVisitor(vectorLayerRasterizingInfo);
SLDParser parser = new SLDParser(styleFactory);
parser.setInput(getClass().getResource("point_pointwithdefaultlabel.sld"));
Style[] styles = parser.readXML();
Assert.assertEquals(1, styles.length);
visitor.visit(styles[0]);
Style copy = (Style) visitor.getCopy();
FeatureTypeStyle featureTypeStyle = copy.featureTypeStyles().iterator().next();
Rule rule = featureTypeStyle.rules().iterator().next();