test_class.declarator: securityFunctionRestController
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private SecurityFunctionRestController securityFunctionRestController;
test_class.type: SecurityFunctionRestController
test_class.var_name: securityFunctionRestController
test_class.declarator: securityFunctionService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SecurityFunctionService securityFunctionService;
test_class.type: SecurityFunctionService
test_class.var_name: securityFunctionService
test_class.file: herd-code/herd-rest/src/test/java/org/finra/herd/rest/SecurityFunctionRestControllerTest.java
test_class.identifier: SecurityFunctionRestControllerTest
test_class.superclass: extends AbstractRestTest
test_case.body: @Test
      public void testGetSecurityFunction() throws Exception
      {
          SecurityFunction securityFunction = new SecurityFunction(SECURITY_FUNCTION);
          when(securityFunctionService.getSecurityFunction(new SecurityFunctionKey(SECURITY_FUNCTION))).thenReturn(securityFunction);
  
          // Retrieve the security function.
          SecurityFunction resultSecurityFunction = securityFunctionRestController.getSecurityFunction(SECURITY_FUNCTION);
  
          // Verify the external calls.
          verify(securityFunctionService).getSecurityFunction(new SecurityFunctionKey(SECURITY_FUNCTION));
          verifyNoMoreInteractions(securityFunctionService);
          // Validate the returned object.
          assertEquals(securityFunction, resultSecurityFunction);
      }
test_case.class_method_signature: SecurityFunctionRestControllerTest.testGetSecurityFunction()
test_case.full_signature: @Test public void testGetSecurityFunction()
test_case.identifier: testGetSecurityFunction
test_case.invocations: thenReturn when getSecurityFunction getSecurityFunction getSecurityFunction verify verifyNoMoreInteractions assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetSecurityFunction()
focal_class.declarator: SECURITY_FUNCTIONS_URI_PREFIX = "/securityFunctions"
focal_class.modifier: private static final
focal_class.original_string: private static final String SECURITY_FUNCTIONS_URI_PREFIX = "/securityFunctions";
focal_class.type: String
focal_class.var_name: SECURITY_FUNCTIONS_URI_PREFIX
focal_class.declarator: securityFunctionService
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SecurityFunctionService securityFunctionService;
focal_class.type: SecurityFunctionService
focal_class.var_name: securityFunctionService
focal_class.file: herd-code/herd-rest/src/main/java/org/finra/herd/rest/SecurityFunctionRestController.java
focal_class.identifier: SecurityFunctionRestController
focal_class.class_method_signature: SecurityFunctionRestController.createSecurityFunction(@RequestBody SecurityFunctionCreateRequest request)
focal_class.full_signature: @RequestMapping(value = SECURITY_FUNCTIONS_URI_PREFIX, method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_SECURITY_FUNCTIONS_POST) public SecurityFunction createSecurityFunction(@RequestBody SecurityFunctionCreateRequest request)
focal_class.identifier: createSecurityFunction
focal_class.modifiers: @RequestMapping(value = SECURITY_FUNCTIONS_URI_PREFIX, method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_SECURITY_FUNCTIONS_POST) public
focal_class.parameters: (@RequestBody SecurityFunctionCreateRequest request)
focal_class.return: SecurityFunction
focal_class.signature: SecurityFunction createSecurityFunction(@RequestBody SecurityFunctionCreateRequest request)
focal_class.class_method_signature: SecurityFunctionRestController.deleteSecurityFunction(@PathVariable("securityFunctionName") String securityFunctionName)
focal_class.full_signature: @RequestMapping(value = SECURITY_FUNCTIONS_URI_PREFIX + "/{securityFunctionName}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_SECURITY_FUNCTIONS_DELETE) public SecurityFunction deleteSecurityFunction(@PathVariable("securityFunctionName") String securityFunctionName)
focal_class.identifier: deleteSecurityFunction
focal_class.modifiers: @RequestMapping(value = SECURITY_FUNCTIONS_URI_PREFIX + "/{securityFunctionName}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_SECURITY_FUNCTIONS_DELETE) public
focal_class.parameters: (@PathVariable("securityFunctionName") String securityFunctionName)
focal_class.return: SecurityFunction
focal_class.signature: SecurityFunction deleteSecurityFunction(@PathVariable("securityFunctionName") String securityFunctionName)
focal_class.class_method_signature: SecurityFunctionRestController.getSecurityFunction(@PathVariable("securityFunctionName") String securityFunctionName)
focal_class.full_signature: @RequestMapping(value = SECURITY_FUNCTIONS_URI_PREFIX + "/{securityFunctionName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_SECURITY_FUNCTIONS_GET) public SecurityFunction getSecurityFunction(@PathVariable("securityFunctionName") String securityFunctionName)
focal_class.identifier: getSecurityFunction
focal_class.modifiers: @RequestMapping(value = SECURITY_FUNCTIONS_URI_PREFIX + "/{securityFunctionName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_SECURITY_FUNCTIONS_GET) public
focal_class.parameters: (@PathVariable("securityFunctionName") String securityFunctionName)
focal_class.return: SecurityFunction
focal_class.signature: SecurityFunction getSecurityFunction(@PathVariable("securityFunctionName") String securityFunctionName)
focal_class.class_method_signature: SecurityFunctionRestController.getSecurityFunctions()
focal_class.full_signature: @RequestMapping(value = SECURITY_FUNCTIONS_URI_PREFIX, method = RequestMethod.GET) @Secured(SecurityFunctions.FN_SECURITY_FUNCTIONS_ALL_GET) public SecurityFunctionKeys getSecurityFunctions()
focal_class.identifier: getSecurityFunctions
focal_class.modifiers: @RequestMapping(value = SECURITY_FUNCTIONS_URI_PREFIX, method = RequestMethod.GET) @Secured(SecurityFunctions.FN_SECURITY_FUNCTIONS_ALL_GET) public
focal_class.parameters: ()
focal_class.return: SecurityFunctionKeys
focal_class.signature: SecurityFunctionKeys getSecurityFunctions()
focal_method.body: @RequestMapping(value = SECURITY_FUNCTIONS_URI_PREFIX + "/{securityFunctionName}", method = RequestMethod.GET)
      @Secured(SecurityFunctions.FN_SECURITY_FUNCTIONS_GET)
      public SecurityFunction getSecurityFunction(@PathVariable("securityFunctionName") String securityFunctionName)
      {
          return securityFunctionService.getSecurityFunction(new SecurityFunctionKey(securityFunctionName));
      }
focal_method.class_method_signature: SecurityFunctionRestController.getSecurityFunction(@PathVariable("securityFunctionName") String securityFunctionName)
focal_method.full_signature: @RequestMapping(value = SECURITY_FUNCTIONS_URI_PREFIX + "/{securityFunctionName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_SECURITY_FUNCTIONS_GET) public SecurityFunction getSecurityFunction(@PathVariable("securityFunctionName") String securityFunctionName)
focal_method.identifier: getSecurityFunction
focal_method.invocations: getSecurityFunction
focal_method.modifiers: @RequestMapping(value = SECURITY_FUNCTIONS_URI_PREFIX + "/{securityFunctionName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_SECURITY_FUNCTIONS_GET) public
focal_method.parameters: (@PathVariable("securityFunctionName") String securityFunctionName)
focal_method.return: SecurityFunction
focal_method.signature: SecurityFunction getSecurityFunction(@PathVariable("securityFunctionName") String securityFunctionName)