@Test
public void testDoDropStoredQuery()
                        throws Exception {

    List<FeatureType> featureTypes = featureTypes();
    StoredQueryHandler storedQueryHandler = new StoredQueryHandler( mockWFS( featureTypes ), new ArrayList<URL>(),
                                                                    managedStoredQueries );
    String id = "mangedStoredQuery";
    insertStoredQuery( storedQueryHandler, id );
    ByteArrayOutputStream outStream = new ByteArrayOutputStream();
    XMLStreamWriter xmlStreamWriter = XMLOutputFactory.newInstance().createXMLStreamWriter( outStream );
    storedQueryHandler.doDropStoredQuery( dropStoredQuery( id ), mockHttpResponseBuffer( xmlStreamWriter ) );
    xmlStreamWriter.close();
    assertThat( storedQueryHandler.hasStoredQuery( id ), is( false ) );
    assertThat( xml( outStream.toString() ), hasXPath( "/wfs:DropStoredQueryResponse[@status='OK']", NS_CONTEXT ) );
}