@Test
public void shouldCreateQuery() throws Exception {

    String statement = "SELECT * FROM [nt:unstructured]";
    QueryManager queryManager = workspace.getQueryManager();
    Query query = queryManager.createQuery(statement, Query.JCR_SQL2);
    assertThat(query, is(notNullValue()));
    assertThat(query.getLanguage(), is(Query.JCR_SQL2));
    assertThat(query.getStatement(), is(statement));
}