SimpleFeature feature = featureBuilder.buildFeature("1");
// creates the symbolizer for the test
Expression color = styleBuilder.colorExpression(Color.RED);
Expression width = styleBuilder.attributeExpression("width");
Stroke stroke = styleBuilder.createStroke(color, width);
LineSymbolizerImpl lineSymb = (LineSymbolizerImpl) styleBuilder.createLineSymbolizer(stroke);
lineSymb.setUnitOfMeasure(uom);