@Test
    void application_with_query_profile_sets_up_query_profile_registry() {
        try (Application application =
                Application.fromApplicationPackage(new File("src/test/app-packages/withqueryprofile"), Networking.disable)) {
            Query query = new Query(HttpRequest.createTestRequest("?query=substring:foobar&timeout=20000", com.yahoo.jdisc.http.HttpRequest.Method.GET), application.getCompiledQueryProfileRegistry().findQueryProfile("default"));
            Result result = application.getJDisc("default").search().process(new ComponentSpecification("default"), query);

            assertEquals("WEAKAND(100) (AND substring:fo substring:oo substring:ob substring:ba substring:ar)",
                    result.hits().get("hasQuery").getQuery().getModel().getQueryTree().toString());
            assertEquals("2", application.getCompiledQueryProfileRegistry().findQueryProfile("default").get("hits"));
            assertEquals("select * from sources * where weakAnd(substring contains \"foobar\") limit 2 timeout 20000000", result.getQuery().yqlRepresentation(true));
        }
    }
Tests that an application with search chains referencing a content cluster can be constructed.
application/src/test/java/com/yahoo/application/ApplicationTest.java