public void assertThatQueriesAreCreated(String selection, List<String> expectedDoctypes, List<String> expectedQueries) throws ParseException {
        DocumentSelector selector = new DocumentSelector(selection);
        NowCheckVisitor visitor = new NowCheckVisitor();
        selector.visit(visitor);
        assertTrue(visitor.requiresConversion());
        SelectionExpressionConverter converter = new SelectionExpressionConverter();
        selector.visit(converter);
        Map<String, String> queryMap = converter.getQueryMap();
        assertEquals(expectedQueries.size(), queryMap.size());
        for (int i = 0; i < expectedQueries.size(); i++) {
            assertTrue(queryMap.containsKey(expectedDoctypes.get(i)));
            assertEquals(expectedQueries.get(i), queryMap.get(expectedDoctypes.get(i)));
        }
    }
@author Simon Thoresen Hult
@author bratseth
document/src/test/java/com/yahoo/document/select/DocumentSelectorTestCase.java