@Test
public void testInitiateDownloadSingleBusinessObjectDataStorageFile()
{

    // Create a business object data storage file key.
    BusinessObjectDataStorageFileKey businessObjectDataStorageFileKey =
        new BusinessObjectDataStorageFileKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
            SUBPARTITION_VALUES, DATA_VERSION, STORAGE_NAME, DIRECTORY_PATH + FILE_NAME);
    // Create a request.
    DownloadBusinessObjectDataStorageFileSingleInitiationRequest downloadBusinessObjectDataStorageFileSingleInitiationRequest =
        new DownloadBusinessObjectDataStorageFileSingleInitiationRequest(businessObjectDataStorageFileKey);
    // Create a response.
    DownloadBusinessObjectDataStorageFileSingleInitiationResponse downloadBusinessObjectDataStorageFileSingleInitiationResponse =
        new DownloadBusinessObjectDataStorageFileSingleInitiationResponse(businessObjectDataStorageFileKey, S3_BUCKET_NAME, AWS_ASSUMED_ROLE_ACCESS_KEY,
            AWS_ASSUMED_ROLE_SECRET_KEY, AWS_ASSUMED_ROLE_SESSION_TOKEN, AWS_ASSUMED_ROLE_SESSION_EXPIRATION_TIME, AWS_PRE_SIGNED_URL);
    // Mock the external calls.
    when(uploadDownloadService.initiateDownloadSingleBusinessObjectDataStorageFile(downloadBusinessObjectDataStorageFileSingleInitiationRequest))
        .thenReturn(downloadBusinessObjectDataStorageFileSingleInitiationResponse);
    // Call the method under test.
    DownloadBusinessObjectDataStorageFileSingleInitiationResponse result =
        uploadDownloadRestController.initiateDownloadSingleBusinessObjectDataStorageFile(downloadBusinessObjectDataStorageFileSingleInitiationRequest);
    // Verify the external calls.
    verify(uploadDownloadService).initiateDownloadSingleBusinessObjectDataStorageFile(downloadBusinessObjectDataStorageFileSingleInitiationRequest);
    verifyNoMoreInteractionsHelper();
    // Validate the results.
    assertEquals("Download business object data storage file single initiation response does not equal result",
        downloadBusinessObjectDataStorageFileSingleInitiationResponse, result);
}