when(gwcd.getServletPrefix()).thenReturn(null);
service = new WMSService(sb, tld, mock(RuntimeStats.class), new NullURLMangler(), gwcd);
@SuppressWarnings("unchecked")
Map<String, String> kvp = new CaseInsensitiveMap();
kvp.put("format", "image/png");
kvp.put("srs", "EPSG:4326");
kvp.put("width", "256");
kvp.put("height", "256");
kvp.put("layers", "mockLayer");
kvp.put("tiled", "true");
kvp.put("request", "GetMap");
List<String> gridSetNames = Arrays.asList("GlobalCRS84Pixel", "GlobalCRS84Scale",
"EPSG:4326");
TileLayer tileLayer = mockTileLayer("mockLayer", gridSetNames);
// make the request match a tile in the expected gridset
BoundingBox bounds;
bounds = tileLayer.getGridSubset(expectedGridset).boundsFromIndex(tileIndex);
kvp.put("bbox", bounds.toString());
HttpServletRequest req = mock(HttpServletRequest.class);
HttpServletResponse resp = mock(HttpServletResponse.class);
when(req.getCharacterEncoding()).thenReturn("UTF-8");