test_class.declarator: securityRoleRestController
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private SecurityRoleRestController securityRoleRestController;
test_class.type: SecurityRoleRestController
test_class.var_name: securityRoleRestController
test_class.declarator: securityRoleService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SecurityRoleService securityRoleService;
test_class.type: SecurityRoleService
test_class.var_name: securityRoleService
test_class.file: herd-code/herd-rest/src/test/java/org/finra/herd/rest/SecurityRoleRestControllerTest.java
test_class.identifier: SecurityRoleRestControllerTest
test_case.body: @Test
      public void testGetSecurityRole()
      {
          // Create a security role key.
          SecurityRoleKey securityRoleKey = new SecurityRoleKey(SECURITY_ROLE);
  
          // Create a security role.
          SecurityRole securityRole = new SecurityRole(SECURITY_ROLE, DESCRIPTION);
  
          // Mock the external calls.
          when(securityRoleService.getSecurityRole(securityRoleKey)).thenReturn(securityRole);
  
          // Call the method under test.
          SecurityRole result = securityRoleRestController.getSecurityRole(SECURITY_ROLE);
  
          // Validate the result.
          assertEquals(securityRole, result);
  
          // Verify the external calls.
          verify(securityRoleService).getSecurityRole(new SecurityRoleKey(SECURITY_ROLE));
          verifyNoMoreInteractions(securityRoleService);
      }
test_case.class_method_signature: SecurityRoleRestControllerTest.testGetSecurityRole()
test_case.full_signature: @Test public void testGetSecurityRole()
test_case.identifier: testGetSecurityRole
test_case.invocations: thenReturn when getSecurityRole getSecurityRole assertEquals getSecurityRole verify verifyNoMoreInteractions
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetSecurityRole()
focal_class.declarator: SECURITY_ROLES_URI_PREFIX = "/securityRoles"
focal_class.modifier: private static final
focal_class.original_string: private static final String SECURITY_ROLES_URI_PREFIX = "/securityRoles";
focal_class.type: String
focal_class.var_name: SECURITY_ROLES_URI_PREFIX
focal_class.declarator: securityRoleService
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SecurityRoleService securityRoleService;
focal_class.type: SecurityRoleService
focal_class.var_name: securityRoleService
focal_class.file: herd-code/herd-rest/src/main/java/org/finra/herd/rest/SecurityRoleRestController.java
focal_class.identifier: SecurityRoleRestController
focal_class.class_method_signature: SecurityRoleRestController.createSecurityRole(@RequestBody SecurityRoleCreateRequest securityRoleCreateRequest)
focal_class.full_signature: @RequestMapping(value = SECURITY_ROLES_URI_PREFIX, method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_SECURITY_ROLES_POST) public SecurityRole createSecurityRole(@RequestBody SecurityRoleCreateRequest securityRoleCreateRequest)
focal_class.identifier: createSecurityRole
focal_class.modifiers: @RequestMapping(value = SECURITY_ROLES_URI_PREFIX, method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_SECURITY_ROLES_POST) public
focal_class.parameters: (@RequestBody SecurityRoleCreateRequest securityRoleCreateRequest)
focal_class.return: SecurityRole
focal_class.signature: SecurityRole createSecurityRole(@RequestBody SecurityRoleCreateRequest securityRoleCreateRequest)
focal_class.class_method_signature: SecurityRoleRestController.deleteSecurityRole(@PathVariable("securityRoleName") String securityRoleName)
focal_class.full_signature: @RequestMapping(value = SECURITY_ROLES_URI_PREFIX + "/{securityRoleName}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_SECURITY_ROLES_DELETE) public SecurityRole deleteSecurityRole(@PathVariable("securityRoleName") String securityRoleName)
focal_class.identifier: deleteSecurityRole
focal_class.modifiers: @RequestMapping(value = SECURITY_ROLES_URI_PREFIX + "/{securityRoleName}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_SECURITY_ROLES_DELETE) public
focal_class.parameters: (@PathVariable("securityRoleName") String securityRoleName)
focal_class.return: SecurityRole
focal_class.signature: SecurityRole deleteSecurityRole(@PathVariable("securityRoleName") String securityRoleName)
focal_class.class_method_signature: SecurityRoleRestController.getSecurityRole(@PathVariable("securityRoleName") String securityRoleName)
focal_class.full_signature: @RequestMapping(value = SECURITY_ROLES_URI_PREFIX + "/{securityRoleName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_SECURITY_ROLES_GET) public SecurityRole getSecurityRole(@PathVariable("securityRoleName") String securityRoleName)
focal_class.identifier: getSecurityRole
focal_class.modifiers: @RequestMapping(value = SECURITY_ROLES_URI_PREFIX + "/{securityRoleName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_SECURITY_ROLES_GET) public
focal_class.parameters: (@PathVariable("securityRoleName") String securityRoleName)
focal_class.return: SecurityRole
focal_class.signature: SecurityRole getSecurityRole(@PathVariable("securityRoleName") String securityRoleName)
focal_class.class_method_signature: SecurityRoleRestController.getSecurityRoles()
focal_class.full_signature: @RequestMapping(value = SECURITY_ROLES_URI_PREFIX, method = RequestMethod.GET) @Secured(SecurityFunctions.FN_SECURITY_ROLES_ALL_GET) public SecurityRoleKeys getSecurityRoles()
focal_class.identifier: getSecurityRoles
focal_class.modifiers: @RequestMapping(value = SECURITY_ROLES_URI_PREFIX, method = RequestMethod.GET) @Secured(SecurityFunctions.FN_SECURITY_ROLES_ALL_GET) public
focal_class.parameters: ()
focal_class.return: SecurityRoleKeys
focal_class.signature: SecurityRoleKeys getSecurityRoles()
focal_class.class_method_signature: SecurityRoleRestController.updateSecurityRole(@PathVariable("securityRoleName") String securityRoleName,
          @RequestBody SecurityRoleUpdateRequest securityRoleUpdateRequest)
focal_class.full_signature: @RequestMapping(value = SECURITY_ROLES_URI_PREFIX + "/{securityRoleName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_SECURITY_ROLES_PUT) public SecurityRole updateSecurityRole(@PathVariable("securityRoleName") String securityRoleName,
          @RequestBody SecurityRoleUpdateRequest securityRoleUpdateRequest)
focal_class.identifier: updateSecurityRole
focal_class.modifiers: @RequestMapping(value = SECURITY_ROLES_URI_PREFIX + "/{securityRoleName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_SECURITY_ROLES_PUT) public
focal_class.parameters: (@PathVariable("securityRoleName") String securityRoleName,
          @RequestBody SecurityRoleUpdateRequest securityRoleUpdateRequest)
focal_class.return: SecurityRole
focal_class.signature: SecurityRole updateSecurityRole(@PathVariable("securityRoleName") String securityRoleName,
          @RequestBody SecurityRoleUpdateRequest securityRoleUpdateRequest)
focal_method.body: @RequestMapping(value = SECURITY_ROLES_URI_PREFIX + "/{securityRoleName}", method = RequestMethod.GET)
      @Secured(SecurityFunctions.FN_SECURITY_ROLES_GET)
      public SecurityRole getSecurityRole(@PathVariable("securityRoleName") String securityRoleName)
      {
          return securityRoleService.getSecurityRole(new SecurityRoleKey(securityRoleName));
      }
focal_method.class_method_signature: SecurityRoleRestController.getSecurityRole(@PathVariable("securityRoleName") String securityRoleName)
focal_method.full_signature: @RequestMapping(value = SECURITY_ROLES_URI_PREFIX + "/{securityRoleName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_SECURITY_ROLES_GET) public SecurityRole getSecurityRole(@PathVariable("securityRoleName") String securityRoleName)
focal_method.identifier: getSecurityRole
focal_method.invocations: getSecurityRole
focal_method.modifiers: @RequestMapping(value = SECURITY_ROLES_URI_PREFIX + "/{securityRoleName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_SECURITY_ROLES_GET) public
focal_method.parameters: (@PathVariable("securityRoleName") String securityRoleName)
focal_method.return: SecurityRole
focal_method.signature: SecurityRole getSecurityRole(@PathVariable("securityRoleName") String securityRoleName)