HashMap kvp = new HashMap();
URL url = GetMapKvpRequestReader.class.getResource("BasicPolygonsFeatureTypeConstaint.sld");
String decoded = URLDecoder.decode(url.toExternalForm(), "UTF-8");
kvp.put("sld", decoded);
GetMapRequest request = (GetMapRequest) reader.createRequest();
request = (GetMapRequest) reader.read(request, parseKvp(kvp), kvp);
assertNotNull(request.getSld());
assertEquals(URLKvpParser.fixURL(decoded), request.getSld().toExternalForm());
// check the style
final Style style = (Style) request.getStyles().get(0);
assertNotNull(style);
assertEquals("TheLibraryModeStyle", style.getName());
// check the layer
assertEquals(1, request.getLayers().size());
MapLayerInfo layer = request.getLayers().get(0);
assertEquals(getLayerId(MockData.BASIC_POLYGONS), layer.getName());
// check the filter imposed in the feature type constraint
FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
assertEquals(1, layer.getLayerFeatureConstraints().length);
assertEquals(ff.equals(ff.property("ID"), ff.literal("xyz")),