@Test
public void testDispatchGetMapNonMatchingParameterFilter() throws Exception {
GetMapRequest request = new GetMapRequest();
@SuppressWarnings("unchecked")
Map<String, String> rawKvp = new CaseInsensitiveMap(new HashMap<String, String>());
request.setRawKvp(rawKvp);
rawKvp.put("layers", tileLayer.getName());
tileLayer.setEnabled(false);
assertDispatchMismatch(request, "tile layer disabled");
tileLayer.setEnabled(true);
assertTrue(layer.enabled());
request.setRemoteOwsURL(new URL("http://example.com"));
assertDispatchMismatch(request, "remote OWS");
request.setRemoteOwsURL(null);
request.setRemoteOwsType("WFS");
assertDispatchMismatch(request, "remote OWS");
request.setRemoteOwsType(null);
request.setEnv(ImmutableMap.of("envVar", "envValue"));
assertDispatchMismatch(request, "no parameter filter exists for ENV");
request.setEnv(null);
request.setFormatOptions(ImmutableMap.of("optKey", "optVal"));
assertDispatchMismatch(request, "no parameter filter exists for FORMAT_OPTIONS");
request.setFormatOptions(null);
request.setAngle(45);
assertDispatchMismatch(request, "no parameter filter exists for ANGLE");
request.setAngle(0);
rawKvp.put("BGCOLOR", "0xAA0000");
assertDispatchMismatch(request, "no parameter filter exists for BGCOLOR");
rawKvp.remove("BGCOLOR");
request.setBuffer(10);
assertDispatchMismatch(request, "no parameter filter exists for BUFFER");
request.setBuffer(0);