StorageRestController extends HerdBaseController { @RequestMapping(value = STORAGE_URI_PREFIX, method = RequestMethod.GET) @Secured(SecurityFunctions.FN_STORAGES_ALL_GET) StorageKeys getStorages() { return storageService.getAllStorage(); }    }
@Test public void testGetStorages() { StorageKeys storageKeys = new StorageKeys(Arrays.asList(new StorageKey(STORAGE_NAME), new StorageKey(STORAGE_NAME_2))); when(storageService.getAllStorage()).thenReturn(storageKeys); StorageKeys result = storageRestController.getStorages(); verify(storageService).getAllStorage(); verifyNoMoreInteractions(storageService); assertEquals(storageKeys, result); }