WorkspacesImpl implements Workspaces { @Override public List<Workspace> all() { String url = conf.getApiUrl() + "user/workspaces.json"; return restClient.doGet(url, GsonTypeTokens.LIST_WORKSPACE); } WorkspacesImpl(Configuration conf, RestClient restClient); @Override List<Workspace> all(); @Override Workspace byName(String name); @Override Workspace current(); Workspaces using(Workspace currentWorkspace);  }
@Test public void shouldFindAll() throws Exception { List<Workspace> all = workspaces.all(); assertThat(all).isNotNull(); assertThat(all).isNotEmpty(); Workspace firstWorkspace = all.get(0); assertThat(firstWorkspace.getId()).isPositive(); assertThat(firstWorkspace.getName()).isNotEmpty(); }