private void assertError(String message,Query query) {
        assertEquals(message, query.validate());
    }
Here, a partially specified query profile is added to a non-mandatory field, making the request underspecified
container-search/src/test/java/com/yahoo/search/query/profile/types/test/MandatoryTestCase.java