UploadDownloadRestController extends HerdBaseController { @RequestMapping(value = "/download/businessObjectDataStorageFile/single/initiation", method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_DOWNLOAD_BUSINESS_OBJECT_DATA_STORAGE_FILE_POST) public DownloadBusinessObjectDataStorageFileSingleInitiationResponse initiateDownloadSingleBusinessObjectDataStorageFile( @RequestBody DownloadBusinessObjectDataStorageFileSingleInitiationRequest downloadBusinessObjectDataStorageFileSingleInitiationRequest) { return uploadDownloadService.initiateDownloadSingleBusinessObjectDataStorageFile(downloadBusinessObjectDataStorageFileSingleInitiationRequest); }  @RequestMapping(value = "/upload/single/initiation", method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_UPLOAD_POST) UploadSingleInitiationResponse initiateUploadSingle(@RequestBody UploadSingleInitiationRequest uploadSingleInitiationRequest); @RequestMapping(value = "/download/single/initiation/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}" + "/businessObjectFormatVersions/{businessObjectFormatVersion}/partitionValues/{partitionValue}" + "/businessObjectDataVersions/{businessObjectDataVersion}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_DOWNLOAD_GET) DownloadSingleInitiationResponse initiateDownloadSingle(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage,
        @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType,
        @PathVariable("businessObjectFormatVersion") Integer businessObjectFormatVersion, @PathVariable("partitionValue") String partitionValue,
        @PathVariable("businessObjectDataVersion") Integer businessObjectDataVersion); @RequestMapping(value = "/upload/single/credential/extension/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}" + "/businessObjectFormatVersions/{businessObjectFormatVersion}/partitionValues/{partitionValue}" + "/businessObjectDataVersions/{businessObjectDataVersion}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_UPLOAD_EXTEND_CREDENTIALS_GET) UploadSingleCredentialExtensionResponse extendUploadSingleCredentials(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage,
        @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType,
        @PathVariable("businessObjectFormatVersion") Integer businessObjectFormatVersion, @PathVariable("partitionValue") String partitionValue,
        @PathVariable("businessObjectDataVersion") Integer businessObjectDataVersion); @RequestMapping(value = "/download/businessObjectDefinitionSampleDataFile/single/initiation", method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_DOWNLOAD_BUSINESS_OBJECT_DEFINITION_SAMPLE_DATA_FILE_POST) DownloadBusinessObjectDefinitionSampleDataFileSingleInitiationResponse initiateDownloadSingleSampleFile(
        @RequestBody DownloadBusinessObjectDefinitionSampleDataFileSingleInitiationRequest downloadBusinesObjectDefinitionSingleInitiationRequest); @RequestMapping(value = "/upload/businessObjectDefinitionSampleDataFile/initiation", method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_UPLOAD_BUSINESS_OBJECT_DEFINITION_SAMPLE_DATA_FILE_POST) UploadBusinessObjectDefinitionSampleDataFileInitiationResponse initiateUploadSampleFile(
        @RequestBody UploadBusinessObjectDefinitionSampleDataFileInitiationRequest uploadBusinessObjectDefinitionSampleDataFileInitiationRequest); @RequestMapping(value = "/download/businessObjectDataStorageFile/single/initiation", method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_DOWNLOAD_BUSINESS_OBJECT_DATA_STORAGE_FILE_POST) DownloadBusinessObjectDataStorageFileSingleInitiationResponse initiateDownloadSingleBusinessObjectDataStorageFile(
        @RequestBody DownloadBusinessObjectDataStorageFileSingleInitiationRequest downloadBusinessObjectDataStorageFileSingleInitiationRequest);  }
@Test public void testInitiateDownloadSingleBusinessObjectDataStorageFile() { 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); DownloadBusinessObjectDataStorageFileSingleInitiationRequest downloadBusinessObjectDataStorageFileSingleInitiationRequest = new DownloadBusinessObjectDataStorageFileSingleInitiationRequest(businessObjectDataStorageFileKey); 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); when(uploadDownloadService.initiateDownloadSingleBusinessObjectDataStorageFile(downloadBusinessObjectDataStorageFileSingleInitiationRequest)) .thenReturn(downloadBusinessObjectDataStorageFileSingleInitiationResponse); DownloadBusinessObjectDataStorageFileSingleInitiationResponse result = uploadDownloadRestController.initiateDownloadSingleBusinessObjectDataStorageFile(downloadBusinessObjectDataStorageFileSingleInitiationRequest); verify(uploadDownloadService).initiateDownloadSingleBusinessObjectDataStorageFile(downloadBusinessObjectDataStorageFileSingleInitiationRequest); verifyNoMoreInteractionsHelper(); assertEquals("Download business object data storage file single initiation response does not equal result", downloadBusinessObjectDataStorageFileSingleInitiationResponse, result); }