@Test
public void testInitManagedStoredQueries()
                        throws Exception {

    List<FeatureType> featureTypes = featureTypes();
    File managedStoredQueries = Files.createTempDirectory( "managedStoredQueries" ).toFile();
    OutputStream output = new FileOutputStream( new File( managedStoredQueries, "storedQuery_byName.xml" ) );
    InputStream resourceAsStream = StoredQueryHandlerTest.class.getResourceAsStream( "storedQuery_byName.xml" );
    IOUtils.copy( resourceAsStream, output );
    resourceAsStream.close();
    output.close();
    StoredQueryHandler storedQueryHandler = new StoredQueryHandler( mockWFS( featureTypes ), new ArrayList<URL>(),
                                                                    managedStoredQueries );
    assertThat( storedQueryHandler.hasStoredQuery( GET_FEATURE_BY_ID ), is( true ) );
    assertThat( storedQueryHandler.hasStoredQuery( GET_FEATURE_BY_TYPE ), is( true ) );
    assertThat( storedQueryHandler.hasStoredQuery( "ByName" ), is( true ) );
}