test_class.declarator: expectedException = ExpectedException.none()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public ExpectedException expectedException = ExpectedException.none();
test_class.type: ExpectedException
test_class.var_name: expectedException
test_class.declarator: securityFunctionDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SecurityFunctionDaoHelper securityFunctionDaoHelper;
test_class.type: SecurityFunctionDaoHelper
test_class.var_name: securityFunctionDaoHelper
test_class.declarator: securityFunctionHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SecurityFunctionHelper securityFunctionHelper;
test_class.type: SecurityFunctionHelper
test_class.var_name: securityFunctionHelper
test_class.declarator: securityRoleDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SecurityRoleDaoHelper securityRoleDaoHelper;
test_class.type: SecurityRoleDaoHelper
test_class.var_name: securityRoleDaoHelper
test_class.declarator: securityRoleFunctionDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SecurityRoleFunctionDao securityRoleFunctionDao;
test_class.type: SecurityRoleFunctionDao
test_class.var_name: securityRoleFunctionDao
test_class.declarator: securityRoleFunctionDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SecurityRoleFunctionDaoHelper securityRoleFunctionDaoHelper;
test_class.type: SecurityRoleFunctionDaoHelper
test_class.var_name: securityRoleFunctionDaoHelper
test_class.declarator: securityRoleFunctionHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SecurityRoleFunctionHelper securityRoleFunctionHelper;
test_class.type: SecurityRoleFunctionHelper
test_class.var_name: securityRoleFunctionHelper
test_class.declarator: securityRoleFunctionService
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private SecurityRoleFunctionServiceImpl securityRoleFunctionService;
test_class.type: SecurityRoleFunctionServiceImpl
test_class.var_name: securityRoleFunctionService
test_class.declarator: securityRoleHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SecurityRoleHelper securityRoleHelper;
test_class.type: SecurityRoleHelper
test_class.var_name: securityRoleHelper
test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/impl/SecurityRoleFunctionServiceImplTest.java
test_class.identifier: SecurityRoleFunctionServiceImplTest
test_case.body: @Test
      public void testDeleteSecurityRoleFunction()
      {
          // Create a security role to function mapping key.
          SecurityRoleFunctionKey securityRoleFunctionKey = new SecurityRoleFunctionKey(SECURITY_ROLE, SECURITY_FUNCTION);
  
          // Create a security role entity.
          SecurityRoleEntity securityRoleEntity = new SecurityRoleEntity();
          securityRoleEntity.setCode(SECURITY_ROLE);
  
          // Create a security function entity.
          SecurityFunctionEntity securityFunctionEntity = new SecurityFunctionEntity();
          securityFunctionEntity.setCode(SECURITY_FUNCTION);
  
          // Create a security role to function mapping entity.
          SecurityRoleFunctionEntity securityRoleFunctionEntity = new SecurityRoleFunctionEntity();
          securityRoleFunctionEntity.setId(ID);
          securityRoleFunctionEntity.setSecurityRole(securityRoleEntity);
          securityRoleFunctionEntity.setSecurityFunction(securityFunctionEntity);
  
          // Mock the external calls.
          when(securityRoleFunctionDaoHelper.getSecurityRoleFunctionEntity(securityRoleFunctionKey)).thenReturn(securityRoleFunctionEntity);
  
          // Call the method under test.
          SecurityRoleFunction result = securityRoleFunctionService.deleteSecurityRoleFunction(securityRoleFunctionKey);
  
          // Validate the results.
          assertEquals(new SecurityRoleFunction(ID, securityRoleFunctionKey), result);
  
          // Verify the external calls.
          verify(securityRoleFunctionHelper).validateAndTrimSecurityRoleFunctionKey(securityRoleFunctionKey);
          verify(securityRoleFunctionDaoHelper).getSecurityRoleFunctionEntity(securityRoleFunctionKey);
          verify(securityRoleFunctionDao).delete(securityRoleFunctionEntity);
          verifyNoMoreInteractionsHelper();
      }
test_case.class_method_signature: SecurityRoleFunctionServiceImplTest.testDeleteSecurityRoleFunction()
test_case.full_signature: @Test public void testDeleteSecurityRoleFunction()
test_case.identifier: testDeleteSecurityRoleFunction
test_case.invocations: setCode setCode setId setSecurityRole setSecurityFunction thenReturn when getSecurityRoleFunctionEntity deleteSecurityRoleFunction assertEquals validateAndTrimSecurityRoleFunctionKey verify getSecurityRoleFunctionEntity verify delete verify verifyNoMoreInteractionsHelper
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDeleteSecurityRoleFunction()
focal_class.declarator: securityFunctionDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SecurityFunctionDaoHelper securityFunctionDaoHelper;
focal_class.type: SecurityFunctionDaoHelper
focal_class.var_name: securityFunctionDaoHelper
focal_class.declarator: securityFunctionHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SecurityFunctionHelper securityFunctionHelper;
focal_class.type: SecurityFunctionHelper
focal_class.var_name: securityFunctionHelper
focal_class.declarator: securityRoleDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SecurityRoleDaoHelper securityRoleDaoHelper;
focal_class.type: SecurityRoleDaoHelper
focal_class.var_name: securityRoleDaoHelper
focal_class.declarator: securityRoleFunctionDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SecurityRoleFunctionDao securityRoleFunctionDao;
focal_class.type: SecurityRoleFunctionDao
focal_class.var_name: securityRoleFunctionDao
focal_class.declarator: securityRoleFunctionDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SecurityRoleFunctionDaoHelper securityRoleFunctionDaoHelper;
focal_class.type: SecurityRoleFunctionDaoHelper
focal_class.var_name: securityRoleFunctionDaoHelper
focal_class.declarator: securityRoleFunctionHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SecurityRoleFunctionHelper securityRoleFunctionHelper;
focal_class.type: SecurityRoleFunctionHelper
focal_class.var_name: securityRoleFunctionHelper
focal_class.declarator: securityRoleHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SecurityRoleHelper securityRoleHelper;
focal_class.type: SecurityRoleHelper
focal_class.var_name: securityRoleHelper
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/impl/SecurityRoleFunctionServiceImpl.java
focal_class.identifier: SecurityRoleFunctionServiceImpl
focal_class.interfaces: implements SecurityRoleFunctionService
focal_class.class_method_signature: SecurityRoleFunctionServiceImpl.createSecurityRoleFunction(SecurityRoleFunctionCreateRequest securityRoleFunctionCreateRequest)
focal_class.full_signature: @Override public SecurityRoleFunction createSecurityRoleFunction(SecurityRoleFunctionCreateRequest securityRoleFunctionCreateRequest)
focal_class.identifier: createSecurityRoleFunction
focal_class.modifiers: @Override public
focal_class.parameters: (SecurityRoleFunctionCreateRequest securityRoleFunctionCreateRequest)
focal_class.return: SecurityRoleFunction
focal_class.signature: SecurityRoleFunction createSecurityRoleFunction(SecurityRoleFunctionCreateRequest securityRoleFunctionCreateRequest)
focal_class.class_method_signature: SecurityRoleFunctionServiceImpl.deleteSecurityRoleFunction(SecurityRoleFunctionKey securityRoleFunctionKey)
focal_class.full_signature: @Override public SecurityRoleFunction deleteSecurityRoleFunction(SecurityRoleFunctionKey securityRoleFunctionKey)
focal_class.identifier: deleteSecurityRoleFunction
focal_class.modifiers: @Override public
focal_class.parameters: (SecurityRoleFunctionKey securityRoleFunctionKey)
focal_class.return: SecurityRoleFunction
focal_class.signature: SecurityRoleFunction deleteSecurityRoleFunction(SecurityRoleFunctionKey securityRoleFunctionKey)
focal_class.class_method_signature: SecurityRoleFunctionServiceImpl.getSecurityRoleFunction(SecurityRoleFunctionKey securityRoleFunctionKey)
focal_class.full_signature: @Override public SecurityRoleFunction getSecurityRoleFunction(SecurityRoleFunctionKey securityRoleFunctionKey)
focal_class.identifier: getSecurityRoleFunction
focal_class.modifiers: @Override public
focal_class.parameters: (SecurityRoleFunctionKey securityRoleFunctionKey)
focal_class.return: SecurityRoleFunction
focal_class.signature: SecurityRoleFunction getSecurityRoleFunction(SecurityRoleFunctionKey securityRoleFunctionKey)
focal_class.class_method_signature: SecurityRoleFunctionServiceImpl.getSecurityRoleFunctions()
focal_class.full_signature: @Override public SecurityRoleFunctionKeys getSecurityRoleFunctions()
focal_class.identifier: getSecurityRoleFunctions
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: SecurityRoleFunctionKeys
focal_class.signature: SecurityRoleFunctionKeys getSecurityRoleFunctions()
focal_class.class_method_signature: SecurityRoleFunctionServiceImpl.getSecurityRoleFunctionsBySecurityFunction(SecurityFunctionKey securityFunctionKey)
focal_class.full_signature: @Override public SecurityRoleFunctionKeys getSecurityRoleFunctionsBySecurityFunction(SecurityFunctionKey securityFunctionKey)
focal_class.identifier: getSecurityRoleFunctionsBySecurityFunction
focal_class.modifiers: @Override public
focal_class.parameters: (SecurityFunctionKey securityFunctionKey)
focal_class.return: SecurityRoleFunctionKeys
focal_class.signature: SecurityRoleFunctionKeys getSecurityRoleFunctionsBySecurityFunction(SecurityFunctionKey securityFunctionKey)
focal_class.class_method_signature: SecurityRoleFunctionServiceImpl.getSecurityRoleFunctionsBySecurityRole(SecurityRoleKey securityRoleKey)
focal_class.full_signature: @Override public SecurityRoleFunctionKeys getSecurityRoleFunctionsBySecurityRole(SecurityRoleKey securityRoleKey)
focal_class.identifier: getSecurityRoleFunctionsBySecurityRole
focal_class.modifiers: @Override public
focal_class.parameters: (SecurityRoleKey securityRoleKey)
focal_class.return: SecurityRoleFunctionKeys
focal_class.signature: SecurityRoleFunctionKeys getSecurityRoleFunctionsBySecurityRole(SecurityRoleKey securityRoleKey)
focal_class.class_method_signature: SecurityRoleFunctionServiceImpl.createSecurityRoleFunctionEntity(SecurityRoleEntity securityRoleEntity, SecurityFunctionEntity securityFunctionEntity)
focal_class.full_signature: private SecurityRoleFunctionEntity createSecurityRoleFunctionEntity(SecurityRoleEntity securityRoleEntity, SecurityFunctionEntity securityFunctionEntity)
focal_class.identifier: createSecurityRoleFunctionEntity
focal_class.modifiers: private
focal_class.parameters: (SecurityRoleEntity securityRoleEntity, SecurityFunctionEntity securityFunctionEntity)
focal_class.return: SecurityRoleFunctionEntity
focal_class.signature: SecurityRoleFunctionEntity createSecurityRoleFunctionEntity(SecurityRoleEntity securityRoleEntity, SecurityFunctionEntity securityFunctionEntity)
focal_class.class_method_signature: SecurityRoleFunctionServiceImpl.createSecurityRoleFunctionFromEntity(SecurityRoleFunctionEntity securityRoleFunctionEntity)
focal_class.full_signature: private SecurityRoleFunction createSecurityRoleFunctionFromEntity(SecurityRoleFunctionEntity securityRoleFunctionEntity)
focal_class.identifier: createSecurityRoleFunctionFromEntity
focal_class.modifiers: private
focal_class.parameters: (SecurityRoleFunctionEntity securityRoleFunctionEntity)
focal_class.return: SecurityRoleFunction
focal_class.signature: SecurityRoleFunction createSecurityRoleFunctionFromEntity(SecurityRoleFunctionEntity securityRoleFunctionEntity)
focal_method.body: @Override
      public SecurityRoleFunction deleteSecurityRoleFunction(SecurityRoleFunctionKey securityRoleFunctionKey)
      {
          // Validate and trim the security role to function mapping key.
          securityRoleFunctionHelper.validateAndTrimSecurityRoleFunctionKey(securityRoleFunctionKey);
  
          // Retrieve and ensure that a security role to function mapping with the specified key exists.
          SecurityRoleFunctionEntity securityRoleFunctionEntity = securityRoleFunctionDaoHelper.getSecurityRoleFunctionEntity(securityRoleFunctionKey);
  
          // Delete this security role to function mapping.
          securityRoleFunctionDao.delete(securityRoleFunctionEntity);
  
          // Create a security role to function mapping object from the deleted entity and return it.
          return createSecurityRoleFunctionFromEntity(securityRoleFunctionEntity);
      }
focal_method.class_method_signature: SecurityRoleFunctionServiceImpl.deleteSecurityRoleFunction(SecurityRoleFunctionKey securityRoleFunctionKey)
focal_method.full_signature: @Override public SecurityRoleFunction deleteSecurityRoleFunction(SecurityRoleFunctionKey securityRoleFunctionKey)
focal_method.identifier: deleteSecurityRoleFunction
focal_method.invocations: validateAndTrimSecurityRoleFunctionKey getSecurityRoleFunctionEntity delete createSecurityRoleFunctionFromEntity
focal_method.modifiers: @Override public
focal_method.parameters: (SecurityRoleFunctionKey securityRoleFunctionKey)
focal_method.return: SecurityRoleFunction
focal_method.signature: SecurityRoleFunction deleteSecurityRoleFunction(SecurityRoleFunctionKey securityRoleFunctionKey)