ModeShapeRestClient { public String queryPlan( String query, String queryLanguage ) { String url = jsonRestClient.appendToURL(QUERY_PLAN_METHOD); String contentType = contentTypeForQueryLanguage(queryLanguage); JSONRestClient.Response response = jsonRestClient.postStreamTextPlain(new ByteArrayInputStream(query.getBytes()), url, contentType); if (!response.isOK()) { throw new RuntimeException(JdbcI18n.invalidServerResponse.text(url, response.asString())); } return response.asString(); } ModeShapeRestClient( String repoUrl,
                                String username,
                                String password ); String serverUrl(); Repositories getRepositories(); Repositories.Repository getRepository( String name ); Workspaces getWorkspaces( String repositoryName ); NodeTypes getNodeTypes(); QueryResult query( String query,
                              String queryLanguage ); String queryPlan( String query,
                             String queryLanguage );  }
@Test public void shouldGetQueryPlan() throws Exception { assertNotNull(REST_CLIENT.queryPlan("SELECT node.[jcr:path] FROM [mode:root] AS node", Query.JCR_SQL2)); }