test_class.declarator: storagePolicyRestController
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private StoragePolicyRestController storagePolicyRestController;
test_class.type: StoragePolicyRestController
test_class.var_name: storagePolicyRestController
test_class.declarator: storagePolicyService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StoragePolicyService storagePolicyService;
test_class.type: StoragePolicyService
test_class.var_name: storagePolicyService
test_class.file: herd-code/herd-rest/src/test/java/org/finra/herd/rest/StoragePolicyRestControllerTest.java
test_class.identifier: StoragePolicyRestControllerTest
test_class.superclass: extends AbstractRestTest
test_case.body: @Test
      public void testGetStoragePolicy()
      {
          StoragePolicyKey storagePolicyKey = new StoragePolicyKey(STORAGE_POLICY_NAMESPACE_CD, STORAGE_POLICY_NAME);
  
          StoragePolicy storagePolicy = new StoragePolicy(ID, storagePolicyKey, new StoragePolicyRule(STORAGE_POLICY_RULE_TYPE, STORAGE_POLICY_RULE_VALUE),
              new StoragePolicyFilter(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, STORAGE_NAME),
              new StoragePolicyTransition(STORAGE_POLICY_TRANSITION_TYPE), StoragePolicyStatusEntity.ENABLED);
  
          when(storagePolicyService.getStoragePolicy(storagePolicyKey)).thenReturn(storagePolicy);
  
          StoragePolicy resultStoragePolicy =
              storagePolicyRestController.getStoragePolicy(storagePolicyKey.getNamespace(), storagePolicyKey.getStoragePolicyName());
  
          // Verify the external calls.
          verify(storagePolicyService).getStoragePolicy(storagePolicyKey);
          verifyNoMoreInteractions(storagePolicyService);
          // Validate the returned object.
          assertEquals(storagePolicy, resultStoragePolicy);
      }
test_case.class_method_signature: StoragePolicyRestControllerTest.testGetStoragePolicy()
test_case.full_signature: @Test public void testGetStoragePolicy()
test_case.identifier: testGetStoragePolicy
test_case.invocations: thenReturn when getStoragePolicy getStoragePolicy getNamespace getStoragePolicyName getStoragePolicy verify verifyNoMoreInteractions assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetStoragePolicy()
focal_class.declarator: STORAGE_POLICIES_URI_PREFIX = "/storagePolicies"
focal_class.modifier: public static final
focal_class.original_string: public static final String STORAGE_POLICIES_URI_PREFIX = "/storagePolicies";
focal_class.type: String
focal_class.var_name: STORAGE_POLICIES_URI_PREFIX
focal_class.declarator: storagePolicyService
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StoragePolicyService storagePolicyService;
focal_class.type: StoragePolicyService
focal_class.var_name: storagePolicyService
focal_class.file: herd-code/herd-rest/src/main/java/org/finra/herd/rest/StoragePolicyRestController.java
focal_class.identifier: StoragePolicyRestController
focal_class.class_method_signature: StoragePolicyRestController.createStoragePolicy(@RequestBody StoragePolicyCreateRequest request)
focal_class.full_signature: @RequestMapping(value = STORAGE_POLICIES_URI_PREFIX, method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_STORAGE_POLICIES_POST) public StoragePolicy createStoragePolicy(@RequestBody StoragePolicyCreateRequest request)
focal_class.identifier: createStoragePolicy
focal_class.modifiers: @RequestMapping(value = STORAGE_POLICIES_URI_PREFIX, method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_STORAGE_POLICIES_POST) public
focal_class.parameters: (@RequestBody StoragePolicyCreateRequest request)
focal_class.return: StoragePolicy
focal_class.signature: StoragePolicy createStoragePolicy(@RequestBody StoragePolicyCreateRequest request)
focal_class.class_method_signature: StoragePolicyRestController.updateStoragePolicy(@PathVariable("namespace") String namespace, @PathVariable("storagePolicyName") String storagePolicyName,
          @RequestBody StoragePolicyUpdateRequest request)
focal_class.full_signature: @RequestMapping(value = STORAGE_POLICIES_URI_PREFIX + "/namespaces/{namespace}/storagePolicyNames/{storagePolicyName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_STORAGE_POLICIES_PUT) public StoragePolicy updateStoragePolicy(@PathVariable("namespace") String namespace, @PathVariable("storagePolicyName") String storagePolicyName,
          @RequestBody StoragePolicyUpdateRequest request)
focal_class.identifier: updateStoragePolicy
focal_class.modifiers: @RequestMapping(value = STORAGE_POLICIES_URI_PREFIX + "/namespaces/{namespace}/storagePolicyNames/{storagePolicyName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_STORAGE_POLICIES_PUT) public
focal_class.parameters: (@PathVariable("namespace") String namespace, @PathVariable("storagePolicyName") String storagePolicyName,
          @RequestBody StoragePolicyUpdateRequest request)
focal_class.return: StoragePolicy
focal_class.signature: StoragePolicy updateStoragePolicy(@PathVariable("namespace") String namespace, @PathVariable("storagePolicyName") String storagePolicyName,
          @RequestBody StoragePolicyUpdateRequest request)
focal_class.class_method_signature: StoragePolicyRestController.getStoragePolicy(@PathVariable("namespace") String namespace, @PathVariable("storagePolicyName") String storagePolicyName)
focal_class.full_signature: @RequestMapping(value = STORAGE_POLICIES_URI_PREFIX + "/namespaces/{namespace}/storagePolicyNames/{storagePolicyName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_STORAGE_POLICIES_GET) public StoragePolicy getStoragePolicy(@PathVariable("namespace") String namespace, @PathVariable("storagePolicyName") String storagePolicyName)
focal_class.identifier: getStoragePolicy
focal_class.modifiers: @RequestMapping(value = STORAGE_POLICIES_URI_PREFIX + "/namespaces/{namespace}/storagePolicyNames/{storagePolicyName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_STORAGE_POLICIES_GET) public
focal_class.parameters: (@PathVariable("namespace") String namespace, @PathVariable("storagePolicyName") String storagePolicyName)
focal_class.return: StoragePolicy
focal_class.signature: StoragePolicy getStoragePolicy(@PathVariable("namespace") String namespace, @PathVariable("storagePolicyName") String storagePolicyName)
focal_class.superclass: extends HerdBaseController
focal_method.body: @RequestMapping(value = STORAGE_POLICIES_URI_PREFIX + "/namespaces/{namespace}/storagePolicyNames/{storagePolicyName}",
          method = RequestMethod.GET)
      @Secured(SecurityFunctions.FN_STORAGE_POLICIES_GET)
      public StoragePolicy getStoragePolicy(@PathVariable("namespace") String namespace, @PathVariable("storagePolicyName") String storagePolicyName)
      {
          return storagePolicyService.getStoragePolicy(new StoragePolicyKey(namespace, storagePolicyName));
      }
focal_method.class_method_signature: StoragePolicyRestController.getStoragePolicy(@PathVariable("namespace") String namespace, @PathVariable("storagePolicyName") String storagePolicyName)
focal_method.full_signature: @RequestMapping(value = STORAGE_POLICIES_URI_PREFIX + "/namespaces/{namespace}/storagePolicyNames/{storagePolicyName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_STORAGE_POLICIES_GET) public StoragePolicy getStoragePolicy(@PathVariable("namespace") String namespace, @PathVariable("storagePolicyName") String storagePolicyName)
focal_method.identifier: getStoragePolicy
focal_method.invocations: getStoragePolicy
focal_method.modifiers: @RequestMapping(value = STORAGE_POLICIES_URI_PREFIX + "/namespaces/{namespace}/storagePolicyNames/{storagePolicyName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_STORAGE_POLICIES_GET) public
focal_method.parameters: (@PathVariable("namespace") String namespace, @PathVariable("storagePolicyName") String storagePolicyName)
focal_method.return: StoragePolicy
focal_method.signature: StoragePolicy getStoragePolicy(@PathVariable("namespace") String namespace, @PathVariable("storagePolicyName") String storagePolicyName)