public void testCreateDynamicMark() throws Exception {
PointSymbolizer symb = sf.createPointSymbolizer();
Mark myMark = sf.createMark();
final String ttfUrl = "ttf://Serif#${symb}";
myMark.setWellKnownName(ff.literal(ttfUrl));
symb.getGraphic().addMark(myMark);
MarkStyle2D ms = (MarkStyle2D) sld.createStyle(feature, symb, range);
assertNotNull(ms.getShape());
SymbolizerKey key = new SymbolizerKey(symb, range);
assertTrue(sld.dynamicSymbolizers.containsKey(key));
Shape expected =
new TTFMarkFactory().getShape(null, ff.literal("ttf://Serif#0xF054"), feature);
PathIterator piExpected = expected.getPathIterator(new AffineTransform());
PathIterator pi = ms.getShape().getPathIterator(new AffineTransform());
double[] coordsExpected = new double[6];
double[] coords = new double[6];
assertEquals(piExpected.getWindingRule(), pi.getWindingRule());
while (!piExpected.isDone()) {
assertFalse(pi.isDone());
piExpected.currentSegment(coordsExpected);
pi.currentSegment(coords);
assertEquals(coordsExpected[0], coords[0], 0.00001);
assertEquals(coordsExpected[1], coords[1], 0.00001);
piExpected.next();
pi.next();
}
assertTrue(pi.isDone());
}