@Beta
    public static Application fromBuilder(Builder builder) throws Exception {
        return builder.build();
    }
@Test
    void handler() throws Exception {
        try (
                ApplicationFacade app = new ApplicationFacade(Application.fromBuilder(new Application.Builder().container("default", new Application.Builder.Container()
                        .handler("http://*/", MockHttpHandler.class))))
                ) {

            RequestHandler handler = app.getRequestHandlerById(MockHttpHandler.class.getName());
            assertNotNull(handler);

            Request request = new Request("http://localhost:" + getDefaults().vespaWebServicePort() + "/");
            Response response = app.handleRequest(request);
            assertNotNull(response);
            assertEquals(response.getStatus(), 200);
            assertEquals(response.getBodyAsString(), "OK");

            request = new Request("http://localhost");
            response = app.handleRequest(request);
            assertNotNull(response);
            assertEquals(response.getStatus(), 200);
            assertEquals(response.getBodyAsString(), "OK");

            request = new Request("http://localhost/?query=foo");
            response = app.handleRequest(request);
            assertNotNull(response);
            assertEquals(response.getStatus(), 200);
            assertEquals(response.getBodyAsString(), "OK");
        }
    }