DownloaderWebClient extends DataBridgeWebClient { public S3KeyPrefixInformation getS3KeyPrefix(BusinessObjectData businessObjectData) throws IOException, JAXBException, URISyntaxException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException { DataBridgeBaseManifestDto dataBridgeBaseManifestDto = new DataBridgeBaseManifestDto(); dataBridgeBaseManifestDto.setNamespace(businessObjectData.getNamespace()); dataBridgeBaseManifestDto.setBusinessObjectDefinitionName(businessObjectData.getBusinessObjectDefinitionName()); dataBridgeBaseManifestDto.setBusinessObjectFormatUsage(businessObjectData.getBusinessObjectFormatUsage()); dataBridgeBaseManifestDto.setBusinessObjectFormatFileType(businessObjectData.getBusinessObjectFormatFileType()); dataBridgeBaseManifestDto.setBusinessObjectFormatVersion(String.valueOf(businessObjectData.getBusinessObjectFormatVersion())); dataBridgeBaseManifestDto.setPartitionKey(businessObjectData.getPartitionKey()); dataBridgeBaseManifestDto.setPartitionValue(businessObjectData.getPartitionValue()); dataBridgeBaseManifestDto.setSubPartitionValues(businessObjectData.getSubPartitionValues()); dataBridgeBaseManifestDto.setStorageName(businessObjectData.getStorageUnits().get(0).getStorage().getName()); return super.getS3KeyPrefix(dataBridgeBaseManifestDto, businessObjectData.getVersion(), Boolean.FALSE); }  BusinessObjectData getBusinessObjectData(DownloaderInputManifestDto manifest); S3KeyPrefixInformation getS3KeyPrefix(BusinessObjectData businessObjectData); StorageUnitDownloadCredential getStorageUnitDownloadCredential(DownloaderInputManifestDto manifest, String storageName);  }
@Test public void testGetS3KeyPrefix() throws Exception { uploadAndRegisterTestDataParents(downloaderWebClient); uploadTestDataFilesToS3(S3_TEST_PATH_V0); final UploaderInputManifestDto uploaderInputManifestDto = getTestUploaderInputManifestDto(); executeWithoutLogging(DataBridgeWebClient.class, new Command() { @Override public void execute() throws Exception { BusinessObjectData businessObjectData = downloaderWebClient.preRegisterBusinessObjectData(uploaderInputManifestDto, StorageEntity.MANAGED_STORAGE, false); BusinessObjectDataKey businessObjectDataKey = businessObjectDataHelper.getBusinessObjectDataKey(businessObjectData); downloaderWebClient .addStorageFiles(businessObjectDataKey, uploaderInputManifestDto, getTestS3FileTransferRequestParamsDto(S3_TEST_PATH_V0 + "/"), StorageEntity.MANAGED_STORAGE); downloaderWebClient.updateBusinessObjectDataStatus(businessObjectDataKey, BusinessObjectDataStatusEntity.VALID); } }); BusinessObjectData businessObjectData = toBusinessObjectData(uploaderInputManifestDto); S3KeyPrefixInformation resultS3KeyPrefixInformation = downloaderWebClient.getS3KeyPrefix(businessObjectData); assertNotNull(resultS3KeyPrefixInformation); assertEquals(S3_SIMPLE_TEST_PATH, resultS3KeyPrefixInformation.getS3KeyPrefix()); }