@Test
public void shouldFindBuiltInNodeTypes() throws Exception {

    String queryString = "select [jcr:path] from [nt:base] where ischildnode('/jcr:system/jcr:nodeTypes')";
    QueryManager queryManager = session.getWorkspace().getQueryManager();
    Query query = queryManager.createQuery(queryString, Query.JCR_SQL2);
    QueryResult result = query.execute();
    long numNodetypes = session.getWorkspace().getNodeTypeManager().getAllNodeTypes().getSize();
    validateQuery().rowCount(numNodetypes).validate(query, result);
}