double size = 100;
double expectedRescaledSize = computeExpectedRescaleSize(size, scaleMetersToPixel, uom);
StyleBuilder styleBuilder = new StyleBuilder();
PolygonSymbolizerImpl polySymb = (PolygonSymbolizerImpl) styleBuilder.createPolygonSymbolizer();
polySymb.setUnitOfMeasure(uom);
FilterFactory2 filterFactory = new FilterFactoryImpl();
polySymb.getStroke().setWidth(filterFactory.literal(size));
visitor = new UomRescaleStyleVisitor(scaleMetersToPixel);
polySymb.accept(visitor);
PolygonSymbolizer rescaledPolySymb = (PolygonSymbolizer) visitor.getCopy();
double rescaledSize = rescaledPolySymb.getStroke().getWidth().evaluate(null, Double.class);
assertEquals(Math.round(expectedRescaledSize), Math.round(rescaledSize));
assertNotSame(rescaledPolySymb, polySymb);