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: uploadDownloadHelper
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private UploadDownloadHelper uploadDownloadHelper;
test_class.type: UploadDownloadHelper
test_class.var_name: uploadDownloadHelper
test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/helper/UploadDownloadHelperTest.java
test_class.identifier: UploadDownloadHelperTest
test_case.body: @Test
      public void testValidateAndTrimBusinessObjectStorageFileKeyWithNullSubPartitionValues()
      {
          // Create a business object data storage file key.
          BusinessObjectDataStorageFileKey businessObjectDataStorageFileKey =
              new BusinessObjectDataStorageFileKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, null,
                  DATA_VERSION, STORAGE_NAME, TEST_S3_KEY_PREFIX + "/" + LOCAL_FILE + "    ");
  
          // Mock the external calls.
          when(alternateKeyHelper.validateStringParameter("namespace", NAMESPACE)).thenReturn(NAMESPACE_2);
          when(alternateKeyHelper.validateStringParameter("business object definition name", BDEF_NAME)).thenReturn(BDEF_NAME_2);
          when(alternateKeyHelper.validateStringParameter("business object format usage", FORMAT_USAGE_CODE)).thenReturn(FORMAT_USAGE_CODE_2);
          when(alternateKeyHelper.validateStringParameter("business object format file type", FORMAT_FILE_TYPE_CODE)).thenReturn(FORMAT_FILE_TYPE_CODE_2);
          when(alternateKeyHelper.validateStringParameter("partition value", PARTITION_VALUE)).thenReturn(PARTITION_VALUE_2);
          when(alternateKeyHelper.validateStringParameter("storage name", STORAGE_NAME)).thenReturn(STORAGE_NAME_2);
  
          // Call the method under test.
          uploadDownloadHelper.validateAndTrimBusinessObjectDataStorageFileKey(businessObjectDataStorageFileKey);
  
          // Validate the results.
          assertEquals(
              new BusinessObjectDataStorageFileKey(NAMESPACE_2, BDEF_NAME_2, FORMAT_USAGE_CODE_2, FORMAT_FILE_TYPE_CODE_2, FORMAT_VERSION, PARTITION_VALUE_2,
                  Lists.newArrayList(), DATA_VERSION, STORAGE_NAME_2, TEST_S3_KEY_PREFIX + "/" + LOCAL_FILE), businessObjectDataStorageFileKey);
  
          // Verify the external calls.
          verify(alternateKeyHelper).validateStringParameter("namespace", NAMESPACE);
          verify(alternateKeyHelper).validateStringParameter("business object definition name", BDEF_NAME);
          verify(alternateKeyHelper).validateStringParameter("business object format usage", FORMAT_USAGE_CODE);
          verify(alternateKeyHelper).validateStringParameter("business object format file type", FORMAT_FILE_TYPE_CODE);
          verify(alternateKeyHelper).validateStringParameter("partition value", PARTITION_VALUE);
          verify(alternateKeyHelper).validateStringParameter("storage name", STORAGE_NAME);
          verifyNoMoreInteractions(alternateKeyHelper);
      }
test_case.class_method_signature: UploadDownloadHelperTest.testValidateAndTrimBusinessObjectStorageFileKeyWithNullSubPartitionValues()
test_case.full_signature: @Test public void testValidateAndTrimBusinessObjectStorageFileKeyWithNullSubPartitionValues()
test_case.identifier: testValidateAndTrimBusinessObjectStorageFileKeyWithNullSubPartitionValues
test_case.invocations: thenReturn when validateStringParameter thenReturn when validateStringParameter thenReturn when validateStringParameter thenReturn when validateStringParameter thenReturn when validateStringParameter thenReturn when validateStringParameter validateAndTrimBusinessObjectDataStorageFileKey assertEquals newArrayList validateStringParameter verify validateStringParameter verify validateStringParameter verify validateStringParameter verify validateStringParameter verify validateStringParameter verify verifyNoMoreInteractions
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testValidateAndTrimBusinessObjectStorageFileKeyWithNullSubPartitionValues()
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/UploadDownloadHelper.java
focal_class.identifier: UploadDownloadHelper
focal_class.class_method_signature: UploadDownloadHelper.validateAndTrimDownloadBusinessObjectDataStorageFileSingleInitiationRequest(
          DownloadBusinessObjectDataStorageFileSingleInitiationRequest downloadBusinessObjectDataStorageFileSingleInitiationRequest)
focal_class.full_signature: public void validateAndTrimDownloadBusinessObjectDataStorageFileSingleInitiationRequest(
          DownloadBusinessObjectDataStorageFileSingleInitiationRequest downloadBusinessObjectDataStorageFileSingleInitiationRequest)
focal_class.identifier: validateAndTrimDownloadBusinessObjectDataStorageFileSingleInitiationRequest
focal_class.modifiers: public
focal_class.parameters: (
          DownloadBusinessObjectDataStorageFileSingleInitiationRequest downloadBusinessObjectDataStorageFileSingleInitiationRequest)
focal_class.return: void
focal_class.signature: void validateAndTrimDownloadBusinessObjectDataStorageFileSingleInitiationRequest(
          DownloadBusinessObjectDataStorageFileSingleInitiationRequest downloadBusinessObjectDataStorageFileSingleInitiationRequest)
focal_class.class_method_signature: UploadDownloadHelper.validateAndTrimBusinessObjectDataStorageFileKey(BusinessObjectDataStorageFileKey businessObjectDataStorageFileKey)
focal_class.full_signature: public void validateAndTrimBusinessObjectDataStorageFileKey(BusinessObjectDataStorageFileKey businessObjectDataStorageFileKey)
focal_class.identifier: validateAndTrimBusinessObjectDataStorageFileKey
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDataStorageFileKey businessObjectDataStorageFileKey)
focal_class.return: void
focal_class.signature: void validateAndTrimBusinessObjectDataStorageFileKey(BusinessObjectDataStorageFileKey businessObjectDataStorageFileKey)
focal_method.body: public void validateAndTrimBusinessObjectDataStorageFileKey(BusinessObjectDataStorageFileKey businessObjectDataStorageFileKey)
      {
          Assert.notNull(businessObjectDataStorageFileKey, "A business object data storage file key must be specified.");
          businessObjectDataStorageFileKey
              .setNamespace(alternateKeyHelper.validateStringParameter("namespace", businessObjectDataStorageFileKey.getNamespace()));
          businessObjectDataStorageFileKey.setBusinessObjectDefinitionName(alternateKeyHelper
              .validateStringParameter("business object definition name", businessObjectDataStorageFileKey.getBusinessObjectDefinitionName()));
          businessObjectDataStorageFileKey.setBusinessObjectFormatUsage(alternateKeyHelper
              .validateStringParameter("business object format usage", businessObjectDataStorageFileKey.getBusinessObjectFormatUsage()));
          businessObjectDataStorageFileKey.setBusinessObjectFormatFileType(alternateKeyHelper
              .validateStringParameter("business object format file type", businessObjectDataStorageFileKey.getBusinessObjectFormatFileType()));
  
          Assert.notNull(businessObjectDataStorageFileKey.getBusinessObjectFormatVersion(), "A business object format version must be specified.");
  
          businessObjectDataStorageFileKey.setPartitionValue(alternateKeyHelper
              .validateStringParameter("partition value", businessObjectDataStorageFileKey.getPartitionValue()));
  
          List<String> subPartitionValues = Lists.newArrayList();
          if (CollectionUtils.isNotEmpty(businessObjectDataStorageFileKey.getSubPartitionValues()))
          {
              for (String subPartitionValue : businessObjectDataStorageFileKey.getSubPartitionValues())
              {
                  subPartitionValues.add(alternateKeyHelper.validateStringParameter("sub partition value", subPartitionValue));
              }
          }
          businessObjectDataStorageFileKey.setSubPartitionValues(subPartitionValues);
  
          Assert.notNull(businessObjectDataStorageFileKey.getBusinessObjectDataVersion(), "A business object data version must be specified.");
  
          businessObjectDataStorageFileKey.setStorageName(alternateKeyHelper
              .validateStringParameter("storage name", businessObjectDataStorageFileKey.getStorageName()));
  
          Assert.hasText(businessObjectDataStorageFileKey.getFilePath(), "A file path must be specified.");
  
          businessObjectDataStorageFileKey.setFilePath(businessObjectDataStorageFileKey.getFilePath().trim());
      }
focal_method.class_method_signature: UploadDownloadHelper.validateAndTrimBusinessObjectDataStorageFileKey(BusinessObjectDataStorageFileKey businessObjectDataStorageFileKey)
focal_method.full_signature: public void validateAndTrimBusinessObjectDataStorageFileKey(BusinessObjectDataStorageFileKey businessObjectDataStorageFileKey)
focal_method.identifier: validateAndTrimBusinessObjectDataStorageFileKey
focal_method.invocations: notNull setNamespace validateStringParameter getNamespace setBusinessObjectDefinitionName validateStringParameter getBusinessObjectDefinitionName setBusinessObjectFormatUsage validateStringParameter getBusinessObjectFormatUsage setBusinessObjectFormatFileType validateStringParameter getBusinessObjectFormatFileType notNull getBusinessObjectFormatVersion setPartitionValue validateStringParameter getPartitionValue newArrayList isNotEmpty getSubPartitionValues getSubPartitionValues add validateStringParameter setSubPartitionValues notNull getBusinessObjectDataVersion setStorageName validateStringParameter getStorageName hasText getFilePath setFilePath trim getFilePath
focal_method.modifiers: public
focal_method.parameters: (BusinessObjectDataStorageFileKey businessObjectDataStorageFileKey)
focal_method.return: void
focal_method.signature: void validateAndTrimBusinessObjectDataStorageFileKey(BusinessObjectDataStorageFileKey businessObjectDataStorageFileKey)