public static Application fromServicesXml(String xml, Networking networking) {
        Path applicationDir = StandaloneContainerRunner.createApplicationPackage(xml);
        return new Application(applicationDir, networking, true);
    }
@Test
    void http_interface_is_on_when_networking_is_enabled() throws Exception {
        int httpPort = getFreePort();
        try (Application application = Application.fromServicesXml(servicesXmlWithServer(httpPort), Networking.enable)) {
            try (DefaultHttpClient client = new org.apache.http.impl.client.DefaultHttpClient()) {
                HttpResponse response = client.execute(new HttpGet("http://localhost:" + httpPort));
                assertEquals(200, response.getStatusLine().getStatusCode());
                BufferedReader r = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
                String line;
                StringBuilder sb = new StringBuilder();
                while ((line = r.readLine()) != null) {
                    sb.append(line).append("\n");
                }
                assertTrue(sb.toString().contains("Handler"));
            }
        }
    }