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 testValidateAndTrimDownloadBusinessObjectDataStorageFileSingleInitiationRequest()
      {
          // 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,
                  SUBPARTITION_VALUES, DATA_VERSION, STORAGE_NAME, TEST_S3_KEY_PREFIX + "/" + LOCAL_FILE + "    ");
  
          // Create a business object data storage file single initiation request.
          DownloadBusinessObjectDataStorageFileSingleInitiationRequest downloadBusinessObjectDataStorageFileSingleInitiationRequest =
              new DownloadBusinessObjectDataStorageFileSingleInitiationRequest(businessObjectDataStorageFileKey);
  
          // 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);
          for (int i = 0; i < SUBPARTITION_VALUES.size(); i++)
          {
              when(alternateKeyHelper.validateStringParameter("sub partition value", SUBPARTITION_VALUES.get(i))).thenReturn(SUBPARTITION_VALUES_2.get(i));
          }
          when(alternateKeyHelper.validateStringParameter("storage name", STORAGE_NAME)).thenReturn(STORAGE_NAME_2);
  
          // Call the method under test.
          uploadDownloadHelper
              .validateAndTrimDownloadBusinessObjectDataStorageFileSingleInitiationRequest(downloadBusinessObjectDataStorageFileSingleInitiationRequest);
  
          // Validate the results.
          assertEquals(new DownloadBusinessObjectDataStorageFileSingleInitiationRequest(
                  new BusinessObjectDataStorageFileKey(NAMESPACE_2, BDEF_NAME_2, FORMAT_USAGE_CODE_2, FORMAT_FILE_TYPE_CODE_2, FORMAT_VERSION, PARTITION_VALUE_2,
                      SUBPARTITION_VALUES_2, DATA_VERSION, STORAGE_NAME_2, TEST_S3_KEY_PREFIX + "/" + LOCAL_FILE)),
              downloadBusinessObjectDataStorageFileSingleInitiationRequest);
  
          // 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);
          for (String subPartitionValue : SUBPARTITION_VALUES)
          {
              verify(alternateKeyHelper).validateStringParameter("sub partition value", subPartitionValue);
          }
          verify(alternateKeyHelper).validateStringParameter("storage name", STORAGE_NAME);
          verifyNoMoreInteractions(alternateKeyHelper);
      }
test_case.class_method_signature: UploadDownloadHelperTest.testValidateAndTrimDownloadBusinessObjectDataStorageFileSingleInitiationRequest()
test_case.full_signature: @Test public void testValidateAndTrimDownloadBusinessObjectDataStorageFileSingleInitiationRequest()
test_case.identifier: testValidateAndTrimDownloadBusinessObjectDataStorageFileSingleInitiationRequest
test_case.invocations: thenReturn when validateStringParameter thenReturn when validateStringParameter thenReturn when validateStringParameter thenReturn when validateStringParameter thenReturn when validateStringParameter size thenReturn when validateStringParameter get get thenReturn when validateStringParameter validateAndTrimDownloadBusinessObjectDataStorageFileSingleInitiationRequest assertEquals validateStringParameter verify 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 testValidateAndTrimDownloadBusinessObjectDataStorageFileSingleInitiationRequest()
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 validateAndTrimDownloadBusinessObjectDataStorageFileSingleInitiationRequest(
          DownloadBusinessObjectDataStorageFileSingleInitiationRequest downloadBusinessObjectDataStorageFileSingleInitiationRequest)
      {
          Assert.notNull(downloadBusinessObjectDataStorageFileSingleInitiationRequest,
              "A download business object data storage file single initiation request must be specified.");
          validateAndTrimBusinessObjectDataStorageFileKey(
              downloadBusinessObjectDataStorageFileSingleInitiationRequest.getBusinessObjectDataStorageFileKey());
      }
focal_method.class_method_signature: UploadDownloadHelper.validateAndTrimDownloadBusinessObjectDataStorageFileSingleInitiationRequest(
          DownloadBusinessObjectDataStorageFileSingleInitiationRequest downloadBusinessObjectDataStorageFileSingleInitiationRequest)
focal_method.full_signature: public void validateAndTrimDownloadBusinessObjectDataStorageFileSingleInitiationRequest(
          DownloadBusinessObjectDataStorageFileSingleInitiationRequest downloadBusinessObjectDataStorageFileSingleInitiationRequest)
focal_method.identifier: validateAndTrimDownloadBusinessObjectDataStorageFileSingleInitiationRequest
focal_method.invocations: notNull validateAndTrimBusinessObjectDataStorageFileKey getBusinessObjectDataStorageFileKey
focal_method.modifiers: public
focal_method.parameters: (
          DownloadBusinessObjectDataStorageFileSingleInitiationRequest downloadBusinessObjectDataStorageFileSingleInitiationRequest)
focal_method.return: void
focal_method.signature: void validateAndTrimDownloadBusinessObjectDataStorageFileSingleInitiationRequest(
          DownloadBusinessObjectDataStorageFileSingleInitiationRequest downloadBusinessObjectDataStorageFileSingleInitiationRequest)