@Beta
    public static Application fromBuilder(Builder builder) throws Exception {
        return builder.build();
    }
@Test
    void query_profile() throws Exception {
        try (Application app = Application.fromBuilder(new Application.Builder()
                .queryProfile("default", "<query-profile id=\"default\">\n" +
                        "<field name=\"defaultage\">7d</field>\n" +
                        "</query-profile>")
                .queryProfileType("type", "<query-profile-type id=\"type\">\n" +
                        "<field name=\"defaultage\" type=\"string\" />\n" +
                        "</query-profile-type>")
                .rankExpression("re", "commonfirstphase(globalstaticrank)")
                .documentType("test", new String(this.getClass().getResourceAsStream("/test.sd").readAllBytes(), StandardCharsets.UTF_8))
                .container("default", new Application.Builder.Container()
                        .search(true)
                ))) {
            Application unused = app;
        }
    }