UploadDownloadRestController extends HerdBaseController { @RequestMapping(value = "/upload/businessObjectDefinitionSampleDataFile/initiation", method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_UPLOAD_BUSINESS_OBJECT_DEFINITION_SAMPLE_DATA_FILE_POST) public UploadBusinessObjectDefinitionSampleDataFileInitiationResponse initiateUploadSampleFile( @RequestBody UploadBusinessObjectDefinitionSampleDataFileInitiationRequest uploadBusinessObjectDefinitionSampleDataFileInitiationRequest) { return uploadDownloadService.initiateUploadSampleFile(uploadBusinessObjectDefinitionSampleDataFileInitiationRequest); }  @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 testInitiateUploadSampleFile() { BusinessObjectDefinitionKey businessObjectDefinitionKey = new BusinessObjectDefinitionKey(BDEF_NAMESPACE, BDEF_NAME); UploadBusinessObjectDefinitionSampleDataFileInitiationRequest request = new UploadBusinessObjectDefinitionSampleDataFileInitiationRequest(businessObjectDefinitionKey); UploadBusinessObjectDefinitionSampleDataFileInitiationResponse response = new UploadBusinessObjectDefinitionSampleDataFileInitiationResponse(businessObjectDefinitionKey, S3_BUCKET_NAME, S3_ENDPOINT, S3_KEY_PREFIX, AWS_ASSUMED_ROLE_ACCESS_KEY, AWS_ASSUMED_ROLE_SECRET_KEY, AWS_ASSUMED_ROLE_SESSION_TOKEN, NO_AWS_KMS_KEY_ID, AWS_ASSUMED_ROLE_SESSION_EXPIRATION_TIME); when(uploadDownloadService.initiateUploadSampleFile(request)).thenReturn(response); UploadBusinessObjectDefinitionSampleDataFileInitiationResponse result = uploadDownloadRestController.initiateUploadSampleFile(request); verify(uploadDownloadService).initiateUploadSampleFile(request); verifyNoMoreInteractionsHelper(); assertEquals(response, result); }