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: alternateKeyHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private AlternateKeyHelper alternateKeyHelper;
test_class.type: AlternateKeyHelper
test_class.var_name: alternateKeyHelper
test_class.declarator: securityRoleHelper
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      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/helper/SecurityRoleHelperTest.java
test_class.identifier: SecurityRoleHelperTest
test_case.body: @Test
      public void testValidateAndTrimSecurityRoleKey()
      {
          // Create a security role key.
          SecurityRoleKey securityRoleKey = new SecurityRoleKey(SECURITY_ROLE);
  
          // Mock the external calls.
          when(alternateKeyHelper.validateStringParameter("security role name", SECURITY_ROLE)).thenReturn(SECURITY_ROLE_2);
  
          // Call the method under test.
          securityRoleHelper.validateAndTrimSecurityRoleKey(securityRoleKey);
  
          // Validate the results.
          assertEquals(new SecurityRoleKey(SECURITY_ROLE_2), securityRoleKey);
  
          // Verify the external calls.
          verify(alternateKeyHelper).validateStringParameter("security role name", SECURITY_ROLE);
          verifyNoMoreInteractions(alternateKeyHelper);
      }
test_case.class_method_signature: SecurityRoleHelperTest.testValidateAndTrimSecurityRoleKey()
test_case.full_signature: @Test public void testValidateAndTrimSecurityRoleKey()
test_case.identifier: testValidateAndTrimSecurityRoleKey
test_case.invocations: thenReturn when validateStringParameter validateAndTrimSecurityRoleKey assertEquals validateStringParameter verify verifyNoMoreInteractions
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testValidateAndTrimSecurityRoleKey()
focal_class.declarator: alternateKeyHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private AlternateKeyHelper alternateKeyHelper;
focal_class.type: AlternateKeyHelper
focal_class.var_name: alternateKeyHelper
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/helper/SecurityRoleHelper.java
focal_class.identifier: SecurityRoleHelper
focal_class.class_method_signature: SecurityRoleHelper.validateAndTrimSecurityRoleKey(SecurityRoleKey securityRoleKey)
focal_class.full_signature: public void validateAndTrimSecurityRoleKey(SecurityRoleKey securityRoleKey)
focal_class.identifier: validateAndTrimSecurityRoleKey
focal_class.modifiers: public
focal_class.parameters: (SecurityRoleKey securityRoleKey)
focal_class.return: void
focal_class.signature: void validateAndTrimSecurityRoleKey(SecurityRoleKey securityRoleKey)
focal_method.body: public void validateAndTrimSecurityRoleKey(SecurityRoleKey securityRoleKey)
      {
          Assert.notNull(securityRoleKey, "A security role key must be specified.");
          securityRoleKey.setSecurityRoleName(alternateKeyHelper.validateStringParameter("security role name", securityRoleKey.getSecurityRoleName()));
      }
focal_method.class_method_signature: SecurityRoleHelper.validateAndTrimSecurityRoleKey(SecurityRoleKey securityRoleKey)
focal_method.full_signature: public void validateAndTrimSecurityRoleKey(SecurityRoleKey securityRoleKey)
focal_method.identifier: validateAndTrimSecurityRoleKey
focal_method.invocations: notNull setSecurityRoleName validateStringParameter getSecurityRoleName
focal_method.modifiers: public
focal_method.parameters: (SecurityRoleKey securityRoleKey)
focal_method.return: void
focal_method.signature: void validateAndTrimSecurityRoleKey(SecurityRoleKey securityRoleKey)