@Test
public void testResponseCleaning()
        throws Exception {

    final String dirty = "<html><head><title>Document title</title><style></style><script>alert('illegal!')</script></head><body><h4>Allowed</h4></body></html>";
    GetGeoPointDataService partialMock = PowerMockito.spy(new GetGeoPointDataService());
    PowerMockito.doReturn(dirty).when(partialMock, "makeGFIcall", anyString(), anyString(), anyString());
    GFIRequestParams params = new GFIRequestParams();
    final OskariLayer layer = new OskariLayer();
    layer.setUsername("name");
    layer.setPassword("anything");
    layer.setUrl("http://example.com/");
    layer.setName("layerName");
    params.setLayer(layer);
    JSONObject response = partialMock.getWMSFeatureInfo(params);
    assertEquals("Should have cleaned html", response.optString("content"), "<h4>Allowed</h4>");
}