private void assertEmbedQueryFails(String embed, String destination, Tensor expected, Map<String, Embedder> embedders, String errMsg) {
        Throwable t = assertThrows(IllegalArgumentException.class, () -> assertEmbedQuery(embed, destination, expected, embedders));
        while (t != null) {
            if (t.getMessage().equals(errMsg)) return;
            t = t.getCause();
        }
        fail("Exception with message '" + errMsg + "' not thrown");
    }
Tests queries towards rank profiles using input declarations.

@author bratseth
container-search/src/test/java/com/yahoo/search/query/RankProfileInputTest.java