@Test
    void testQueryProfileClearValue() {
        QueryProfile profile = new QueryProfile("myProfile");
        profile.set("a", "a-value", null);
        profile.set("b", "b-value", null);
        profile.set("b.c", "b.c-value", null);
        profile.set("b.d", "b.d-value", null);
        Query q = new Query(QueryTestCase.httpEncode("/search?queryProfile=myProfile"), profile.compile(null));
        assertEquals("a-value", q.properties().get("a"));
        assertEquals("b-value", q.properties().get("b"));
        assertEquals("b.c-value", q.properties().get("b.c"));
        assertEquals("b.d-value", q.properties().get("b.d"));
        assertContains(q.properties().listProperties("b"), "b-value", "b.c-value", "b.d-value");

        q.properties().set("a", null, null);
        assertNull(q.properties().get("a"));

        q.properties().set("b", null, null);
        assertNull(q.properties().get("b"));
        assertEquals("b.c-value", q.properties().get("b.c"));
        assertEquals("b.d-value", q.properties().get("b.d"));
        assertContains(q.properties().listProperties("b"), null, "b.c-value", "b.d-value");

        q.properties().set("b", "b-value", null);
        q.properties().set("b.e", "b.e-value", null);
        q.properties().set("b.f", "b.f-value", null);
        assertEquals("b-value", q.properties().get("b"));
        assertEquals("b.e-value", q.properties().get("b.e"));
        assertContains(q.properties().listProperties("b"), "b-value", "b.c-value", "b.d-value", "b.e-value", "b.f-value");

        q.properties().clearAll("b");
        assertNull(q.properties().get("b"));
        assertNull(q.properties().get("b.c"));
        assertNull(q.properties().get("b.d"));
        assertNull(q.properties().get("b.e"));
        assertNull(q.properties().get("b.f"));
        assertContains(q.properties().listProperties("b"), (Object) null);
    }
Select is special handled due to the strange idea to also use it to contain subproperties with JSON.
container-search/src/test/java/com/yahoo/search/test/QueryTestCase.java