@FixFor("MODE-2499")
@Test
public void shouldThrowExceptionWhenXPathSyntaxNotValid() throws RepositoryException {

    String sql = "select node.[jcr:name] from [nt:unstructured] as node";
    try {
        Query query = session.getWorkspace().getQueryManager().createQuery(sql, Query.XPATH);
        fail("Should throw InvalidQueryException");
    } catch (InvalidQueryException e) {
    }
}