ModeShapeRestClient { public Repositories.Repository getRepository( String name ) { JSONRestClient.Response response = jsonRestClient.doGet(); if (!response.isOK()) { throw new RuntimeException(JdbcI18n.invalidServerResponse.text(jsonRestClient.url(), response.asString())); } return new Repositories(response.json()).getRepository(name); } 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 shouldGetRepositoryByName() throws Exception { assertNull(REST_CLIENT.getRepository("foobar")); Repositories.Repository repository = REST_CLIENT.getRepository("repo"); assertNotNull(repository); }