test_class.declarator: storageRestController
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private StorageRestController storageRestController;
test_class.type: StorageRestController
test_class.var_name: storageRestController
test_class.declarator: storageService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageService storageService;
test_class.type: StorageService
test_class.var_name: storageService
test_class.file: herd-code/herd-rest/src/test/java/org/finra/herd/rest/StorageRestControllerTest.java
test_class.identifier: StorageRestControllerTest
test_class.superclass: extends AbstractRestTest
test_case.body: @Test
      public void testUpdateStorage()
      {
          // Create a storage key.
          StorageKey storageKey = new StorageKey(STORAGE_NAME);
  
          // Create a storage update request.
          StorageUpdateRequest storageUpdateRequest = new StorageUpdateRequest();
  
          // Create a storage.
          Storage storage = new Storage(STORAGE_NAME, STORAGE_PLATFORM_CODE, NO_ATTRIBUTES);
  
          // Mock the external calls.
          when(storageService.updateStorage(storageKey, storageUpdateRequest)).thenReturn(storage);
  
          // Call the method under test.
          Storage result = storageRestController.updateStorage(STORAGE_NAME, storageUpdateRequest);
  
          // Verify the external calls.
          verify(storageService).updateStorage(storageKey, storageUpdateRequest);
          verifyNoMoreInteractions(storageService);
  
          // Validate the returned object.
          assertEquals(storage, result);
      }
test_case.class_method_signature: StorageRestControllerTest.testUpdateStorage()
test_case.full_signature: @Test public void testUpdateStorage()
test_case.identifier: testUpdateStorage
test_case.invocations: thenReturn when updateStorage updateStorage updateStorage verify verifyNoMoreInteractions assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testUpdateStorage()
focal_class.declarator: STORAGE_URI_PREFIX = "/storages"
focal_class.modifier: private static final
focal_class.original_string: private static final String STORAGE_URI_PREFIX = "/storages";
focal_class.type: String
focal_class.var_name: STORAGE_URI_PREFIX
focal_class.declarator: storageService
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageService storageService;
focal_class.type: StorageService
focal_class.var_name: storageService
focal_class.file: herd-code/herd-rest/src/main/java/org/finra/herd/rest/StorageRestController.java
focal_class.identifier: StorageRestController
focal_class.class_method_signature: StorageRestController.createStorage(@RequestBody StorageCreateRequest storageCreateRequest)
focal_class.full_signature: @RequestMapping(value = STORAGE_URI_PREFIX, method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_STORAGES_POST) Storage createStorage(@RequestBody StorageCreateRequest storageCreateRequest)
focal_class.identifier: createStorage
focal_class.modifiers: @RequestMapping(value = STORAGE_URI_PREFIX, method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_STORAGES_POST)
focal_class.parameters: (@RequestBody StorageCreateRequest storageCreateRequest)
focal_class.return: Storage
focal_class.signature: Storage createStorage(@RequestBody StorageCreateRequest storageCreateRequest)
focal_class.class_method_signature: StorageRestController.deleteStorage(@PathVariable("storageName") String storageName)
focal_class.full_signature: @RequestMapping(value = STORAGE_URI_PREFIX + "/{storageName}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_STORAGES_DELETE) Storage deleteStorage(@PathVariable("storageName") String storageName)
focal_class.identifier: deleteStorage
focal_class.modifiers: @RequestMapping(value = STORAGE_URI_PREFIX + "/{storageName}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_STORAGES_DELETE)
focal_class.parameters: (@PathVariable("storageName") String storageName)
focal_class.return: Storage
focal_class.signature: Storage deleteStorage(@PathVariable("storageName") String storageName)
focal_class.class_method_signature: StorageRestController.getStorage(@PathVariable("storageName") String storageName)
focal_class.full_signature: @RequestMapping(value = STORAGE_URI_PREFIX + "/{storageName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_STORAGES_GET) Storage getStorage(@PathVariable("storageName") String storageName)
focal_class.identifier: getStorage
focal_class.modifiers: @RequestMapping(value = STORAGE_URI_PREFIX + "/{storageName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_STORAGES_GET)
focal_class.parameters: (@PathVariable("storageName") String storageName)
focal_class.return: Storage
focal_class.signature: Storage getStorage(@PathVariable("storageName") String storageName)
focal_class.class_method_signature: StorageRestController.getStorages()
focal_class.full_signature: @RequestMapping(value = STORAGE_URI_PREFIX, method = RequestMethod.GET) @Secured(SecurityFunctions.FN_STORAGES_ALL_GET) StorageKeys getStorages()
focal_class.identifier: getStorages
focal_class.modifiers: @RequestMapping(value = STORAGE_URI_PREFIX, method = RequestMethod.GET) @Secured(SecurityFunctions.FN_STORAGES_ALL_GET)
focal_class.parameters: ()
focal_class.return: StorageKeys
focal_class.signature: StorageKeys getStorages()
focal_class.class_method_signature: StorageRestController.updateStorage(@PathVariable("storageName") String storageName, @RequestBody StorageUpdateRequest storageUpdateRequest)
focal_class.full_signature: @RequestMapping(value = STORAGE_URI_PREFIX + "/{storageName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_STORAGES_PUT) Storage updateStorage(@PathVariable("storageName") String storageName, @RequestBody StorageUpdateRequest storageUpdateRequest)
focal_class.identifier: updateStorage
focal_class.modifiers: @RequestMapping(value = STORAGE_URI_PREFIX + "/{storageName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_STORAGES_PUT)
focal_class.parameters: (@PathVariable("storageName") String storageName, @RequestBody StorageUpdateRequest storageUpdateRequest)
focal_class.return: Storage
focal_class.signature: Storage updateStorage(@PathVariable("storageName") String storageName, @RequestBody StorageUpdateRequest storageUpdateRequest)
focal_class.class_method_signature: StorageRestController.updateStorageAttributes(@PathVariable("storageName") String storageName, @RequestBody StorageAttributesUpdateRequest storageAttributesUpdateRequest)
focal_class.full_signature: @RequestMapping(value = "/storageAttributes/storages/{storageName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_STORAGE_ATTRIBUTES_PUT) Storage updateStorageAttributes(@PathVariable("storageName") String storageName, @RequestBody StorageAttributesUpdateRequest storageAttributesUpdateRequest)
focal_class.identifier: updateStorageAttributes
focal_class.modifiers: @RequestMapping(value = "/storageAttributes/storages/{storageName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_STORAGE_ATTRIBUTES_PUT)
focal_class.parameters: (@PathVariable("storageName") String storageName, @RequestBody StorageAttributesUpdateRequest storageAttributesUpdateRequest)
focal_class.return: Storage
focal_class.signature: Storage updateStorageAttributes(@PathVariable("storageName") String storageName, @RequestBody StorageAttributesUpdateRequest storageAttributesUpdateRequest)
focal_class.superclass: extends HerdBaseController
focal_method.body: @RequestMapping(value = STORAGE_URI_PREFIX + "/{storageName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"})
      @Secured(SecurityFunctions.FN_STORAGES_PUT)
      Storage updateStorage(@PathVariable("storageName") String storageName, @RequestBody StorageUpdateRequest storageUpdateRequest)
      {
          return storageService.updateStorage(new StorageKey(storageName), storageUpdateRequest);
      }
focal_method.class_method_signature: StorageRestController.updateStorage(@PathVariable("storageName") String storageName, @RequestBody StorageUpdateRequest storageUpdateRequest)
focal_method.full_signature: @RequestMapping(value = STORAGE_URI_PREFIX + "/{storageName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_STORAGES_PUT) Storage updateStorage(@PathVariable("storageName") String storageName, @RequestBody StorageUpdateRequest storageUpdateRequest)
focal_method.identifier: updateStorage
focal_method.invocations: updateStorage
focal_method.modifiers: @RequestMapping(value = STORAGE_URI_PREFIX + "/{storageName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_STORAGES_PUT)
focal_method.parameters: (@PathVariable("storageName") String storageName, @RequestBody StorageUpdateRequest storageUpdateRequest)
focal_method.return: Storage
focal_method.signature: Storage updateStorage(@PathVariable("storageName") String storageName, @RequestBody StorageUpdateRequest storageUpdateRequest)