StorageProviderBase implements StorageProvider { public void deleteSpace(String spaceId) { log.debug("deleteSpace(" + spaceId + ")"); throwIfSpaceNotExist(spaceId); Map<String, String> allProps = getAllSpaceProperties(spaceId); allProps.put("is-delete", "true"); doSetSpaceProperties(spaceId, allProps); SpaceDeleteWorker deleteThread = getSpaceDeleteWorker(spaceId); new Thread(deleteThread).start(); }  Map<String, String> getSpaceProperties(String spaceId); void setNewSpaceProperties(String spaceId,
                                      Map<String, String> spaceProperties); void setNewSpaceProperties(String spaceId,
                                      Map<String, String> spaceProperties,
                                      Map<String, AclType> spaceACLs); Map<String, AclType> getSpaceACLs(String spaceId); void setSpaceACLs(String spaceId, Map<String, AclType> spaceACLs); void deleteSpace(String spaceId); void deleteSpaceSync(String spaceId); SpaceDeleteWorker getSpaceDeleteWorker(String spaceId); void setWrappedStorageProvider(StorageProvider wrappedStorageProvider);  }
@Test public void testDeleteSpace() { providerMock.throwIfSpaceNotExist(spaceId); EasyMock.expectLastCall().once(); EasyMock.expect(providerMock.getAllSpaceProperties(spaceId)).andReturn( new HashMap<String, String>()).once(); providerMock.doSetSpaceProperties(EasyMock.<String>anyObject(), EasyMock.<Map<String, String>>anyObject()); EasyMock.expectLastCall().once(); replayMocks(); providerBase.deleteSpace(spaceId); }