StorageRestController extends HerdBaseController { @RequestMapping(value = STORAGE_URI_PREFIX + "/{storageName}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_STORAGES_DELETE) Storage deleteStorage(@PathVariable("storageName") String storageName) { return storageService.deleteStorage(new StorageKey(storageName)); }    }
@Test public void testDeleteStorage() { StorageKey storageKey = new StorageKey(STORAGE_NAME); Storage storage = new Storage(STORAGE_NAME, STORAGE_PLATFORM_CODE, NO_ATTRIBUTES); when(storageService.deleteStorage(storageKey)).thenReturn(storage); Storage result = storageRestController.deleteStorage(STORAGE_NAME); verify(storageService).deleteStorage(storageKey); verifyNoMoreInteractions(storageService); assertEquals(storage, result); }