ContentStoreImpl implements ContentStore { @Override public Space getSpace(final String spaceId, final String prefix, final long maxResults, final String marker) throws ContentStoreException { return execute(new Retriable() { @Override public Space retry() throws ContentStoreException { return doGetSpace(spaceId, prefix, maxResults, marker); } }); } ContentStoreImpl(String baseURL,
                            StorageProviderType type,
                            String storeId,
                            boolean writable,
                            RestHttpHelper restHelper);  ContentStoreImpl(String baseURL,
                            StorageProviderType type,
                            String storeId,
                            boolean writable,
                            RestHttpHelper restHelper,
                            int maxRetries); @Override void setRetryExceptionHandler(ExceptionHandler retryExceptionHandler); String getBaseURL(); @Override String getStoreId(); @Override boolean isWritable(); @Override String getStorageProviderType(); @Override List<String> getSpaces(); @Override Iterator<String> getSpaceContents(String spaceId); @Override Iterator<String> getSpaceContents(final String spaceId,
                                             final String prefix); @Override Space getSpace(final String spaceId,
                          final String prefix,
                          final long maxResults,
                          final String marker); @Override void createSpace(final String spaceId); @Override void deleteSpace(final String spaceId); @Override Map<String, String> getSpaceProperties(final String spaceId); @Override Map<String, AclType> getSpaceACLs(final String spaceId); @Override void setSpaceACLs(final String spaceId,
                             final Map<String, AclType> spaceACLs); @Override boolean spaceExists(String spaceId); @Override String addContent(final String spaceId,
                             final String contentId,
                             final InputStream content,
                             final long contentSize,
                             final String contentMimeType,
                             final String contentChecksum,
                             final Map<String, String> contentProperties); @Override String copyContent(final String srcSpaceId,
                              final String srcContentId,
                              final String destStoreId,
                              final String destSpaceId,
                              final String destContentId); @Override String copyContent(String srcSpaceId,
                              String srcContentId,
                              String destSpaceId,
                              String destContentId); @Override String moveContent(String srcSpaceId,
                              String srcContentId,
                              String destSpaceId,
                              String destContentId); @Override String moveContent(String srcSpaceId,
                              String srcContentId,
                              String destStoreId,
                              String destSpaceId,
                              String destContentId); @Override Content getContent(String spaceId, String contentId, Long startByte, Long endByte); @Override Content getContent(final String spaceId, final String contentId); @Override void deleteContent(final String spaceId, final String contentId); @Override void setContentProperties(final String spaceId,
                                     final String contentId,
                                     final Map<String, String> contentProperties); @Override Map<String, String> getContentProperties(final String spaceId,
                                                    final String contentId); @Override boolean contentExists(String spaceId, String contentId); void validateStoreId(String storeId); @Override void validateSpaceId(String spaceId); @Override void validateContentId(String contentId); @Override List<String> getSupportedTasks(); @Override String performTask(final String taskName,
                              final String taskParameters); @Override String performTaskWithNoRetries(final String taskName,
                                           final String taskParameters); @Override InputStream getManifest(String spaceId, ManifestFormat format); @Override InputStream getAuditLog(String spaceId); @Override BitIntegrityReport getBitIntegrityReport(String spaceId); @Override BitIntegrityReportProperties getBitIntegrityReportProperties(String spaceId); @Override SpaceStatsDTOList getSpaceStats(String spaceId, Date start, Date end); @Override SpaceStatsDTOList getStorageProviderStats(Date start, Date end); @Override SpaceStatsDTOList getStorageProviderStatsByDay(Date date); @Override String toString();  }
@Test public void testGetSpace() throws Exception { String xml = "<space id=\"space1\"><item>Image 1</item><item>Image 2</item></space>"; String fullURL = baseURL + "/" + spaceId + "?maxResults=10&storeID=" + storeId; EasyMock.expect(response.getStatusCode()).andReturn(200); EasyMock.expect(response.getResponseBody()).andReturn(xml); EasyMock.expect(response.getResponseHeaders()).andReturn(new Header[0]); EasyMock.expect(restHelper.get(fullURL)).andReturn(response); replayMocks(); Space space = contentStore.getSpace(spaceId, null, 10, null); Assert.assertNotNull(space); List<String> spaceContents = space.getContentIds(); Assert.assertEquals(2, spaceContents.size()); }