// no styles, no layer, the full definition is in the sld
HashMap kvp = new HashMap();
URL url = GetMapKvpRequestReader.class.getResource("BasicPolygonsFeatureTypeConstaint.sld");
kvp.put("sld", URLDecoder.decode(url.toExternalForm(), "UTF-8"));
GetMapRequest request = (GetMapRequest) reader.createRequest();
request = (GetMapRequest) reader.read(request, parseKvp(kvp), kvp);
assertNotNull(request.getSld());
assertEquals(url, request.getSld());
// 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")),