### Question:
JsonRestClient implements IRestClient { @Override public List<QueryRow> query( Workspace workspace, String language, String statement ) throws Exception { return query(workspace, language, statement, 0, -1, null); }  Collection<Repository> getRepositories( Server server ); @Override Map<String, javax.jcr.nodetype.NodeType> getNodeTypes( Repository repository ); URL getUrl( File file,
                       String path,
                       Workspace workspace ); Collection<Workspace> getWorkspaces( Repository repository ); boolean pathExists( Workspace workspace,
                               String path,
                               File file ); Status publish( Workspace workspace,
                           String path,
                           File file ); Status unpublish( Workspace workspace,
                             String path,
                             File file ); @Override List<QueryRow> query( Workspace workspace,
                                 String language,
                                 String statement ); @Override List<QueryRow> query( Workspace workspace,
                                 String language,
                                 String statement,
                                 int offset,
                                 int limit ); @SuppressWarnings( "unchecked" ) @Override List<QueryRow> query( Workspace workspace,
                                 String language,
                                 String statement,
                                 int offset,
                                 int limit,
                                 Map<String, String> variables ); @SuppressWarnings( "null" ) static void main( String[] args );  }### Answer:
@Test public void shouldQuery() throws Exception { shouldPublishTextResource(); List<QueryRow> results = this.restClient.query(WORKSPACE1, IJcrConstants.XPATH, "/" + FILE_PATH); assertThat(results.size(), is(1)); QueryRow row = results.get(0); assertThat(row.getColumnNames().size(), is(3)); assertThat(row.getColumnNames().contains("jcr:score"), is(true)); assertThat(row.getColumnNames().contains("jcr:path"), is(true)); assertThat(row.getColumnNames().contains("jcr:primaryType"), is(true)); assertThat(row.getColumnType("jcr:score"), is("DOUBLE")); assertThat(row.getColumnType("jcr:path"), is("STRING")); assertThat(row.getColumnType("jcr:primaryType"), is("STRING")); assertThat((String)row.getValue("jcr:path"), is("/myproject/myfolder/document.txt")); assertThat((String)row.getValue("jcr:primaryType"), is("nt:file")); }