}
public void testDeleteWithPurge() throws Exception {
String xml = newSLDXML();
MockHttpServletResponse response =
postAsServletResponse( "/rest/styles", xml, StyleResource.MEDIATYPE_SLD.toString());
assertNotNull( catalog.getStyleByName( "foo" ) );
//ensure the style not deleted on disk
assertTrue(new File(getDataDirectory().findStyleDir(), "foo.sld").exists());
response = deleteAsServletResponse("/rest/styles/foo?purge=true");
assertEquals( 200, response.getStatusCode() );
//ensure the style not deleted on disk
assertFalse(new File(getDataDirectory().findStyleDir(), "foo.sld").exists());
}