symb.setGraphic(gr);
Literal snippet = ff.literal("no idea what a snipet is good for");
symb.setSnippet(snippet);
Literal fD = ff.literal("some description");
symb.setFeatureDescription(fD);
OtherTextImpl otherText = new OtherTextImpl();
otherText.setTarget("otherTextTarget");
otherText.setText(ff.literal("otherTextText"));
symb.setOtherText(otherText);
// copy it
TextSymbolizer2 copy = (TextSymbolizer2) visitor.copy(symb);
// compare it
assertEquals("Graphic of TextSymbolizer2 has not been correctly duplicated", gr, copy
.getGraphic());
assertEquals("Graphic of TextSymbolizer2 has not been correctly duplicated", gr.getOpacity(), copy
.getGraphic().getOpacity());
assertEquals("Graphic of TextSymbolizer2 has not been correctly duplicated", gr.getSize(), copy
.getGraphic().getSize());
assertEquals("Snippet of TextSymbolizer2 has not been correctly duplicated", snippet, copy
.getSnippet());
assertEquals("FeatureDescription of TextSymbolizer2 has not been correctly duplicated", fD, copy
.getFeatureDescription());
assertEquals("OtherText of TextSymbolizer2 has not been correctly duplicated", otherText.getTarget(), copy
.getOtherText().getTarget());
assertEquals("OtherText of TextSymbolizer2 has not been correctly duplicated", otherText.getText(), copy
.getOtherText().getText());
}