BrokeredStorageProvider implements StorageProvider { public String addContent(String spaceId, String contentId, String contentMimeType, Map<String, String> userProperties, long contentSize, String contentChecksum, InputStream content) throws StorageException { return dispatchProvider.addContent(targetProvider, storeId, spaceId, contentId, contentMimeType, userProperties, contentSize, contentChecksum, content); } BrokeredStorageProvider(StatelessStorageProvider dispatchProvider,
                                   StorageProvider targetProvider,
                                   StorageProviderType targetType,
                                   String storeId); StorageProviderType getTargetType(); @Override StorageProviderType getStorageProviderType(); String addContent(String spaceId,
                             String contentId,
                             String contentMimeType,
                             Map<String, String> userProperties,
                             long contentSize,
                             String contentChecksum,
                             InputStream content); @Override String copyContent(String sourceSpaceId,
                              String sourceContentId,
                              String destSpaceId,
                              String destContentId); void createSpace(String spaceId); void deleteContent(String spaceId, String contentId); void deleteSpace(String spaceId); RetrievedContent getContent(String spaceId, String contentId); RetrievedContent getContent(String spaceId, String contentId, String range); Map<String, String> getContentProperties(String spaceId,
                                                    String contentId); Iterator<String> getSpaceContents(String spaceId, String prefix); List<String> getSpaceContentsChunked(String spaceId,
                                                String prefix,
                                                long maxResults,
                                                String marker); Map<String, String> getSpaceProperties(String spaceId); Iterator<String> getSpaces(); void setContentProperties(String spaceId,
                                     String contentId,
                                     Map<String, String> contentProperties); @Override Map<String, AclType> getSpaceACLs(String spaceId); @Override void setSpaceACLs(String spaceId, Map<String, AclType> spaceACLs);  }
@Test public void testAddContent() throws StorageException { directProvider.addContent(spaceId, contentId, contentMimeType, userProperties, contentSize, null, content); broker.addContent(spaceId, contentId, contentMimeType, userProperties, contentSize, null, content); verifySpaceId(); verifyContentId(); verifyContentMimeType(); verifyContentSize(); verifyContent(); }