// rescales symbolizer
visitor = new UomRescaleStyleVisitor(scaleMetersToPixel);
lineSymb.accept(visitor);
LineSymbolizer rescaledLineSymb = (LineSymbolizer) visitor.getCopy();
// tests results
org.opengis.style.Stroke rescaledStroke = rescaledLineSymb.getStroke();
Expression rescaledWidth = rescaledStroke.getWidth();
double rescaledWidthValue = rescaledWidth.evaluate(feature, Double.class);
double expectedRescaledWidthValue = computeExpectedRescaleSize(widthValue, scaleMetersToPixel, uom);
assertEquals(stroke.getColor(), rescaledStroke.getColor());
assertEquals(expectedRescaledWidthValue, rescaledWidthValue, 0d);
assertNotSame(SI.METER, rescaledLineSymb.getUnitOfMeasure());
assertNotSame(rescaledLineSymb, lineSymb);
}
catch (Exception e2)
{
e2.printStackTrace();