RetentionExpirationDestroyerController { public void performRetentionExpirationDestruction(File localInputFile, RegServerAccessParamsDto regServerAccessParamsDto) throws Exception { List<BusinessObjectDataKey> businessObjectDataKeys = getBusinessObjectDataKeys(localInputFile); retentionExpirationDestroyerWebClient.setRegServerAccessParamsDto(regServerAccessParamsDto); LOGGER.info("Processing {} business object data instances for destruction.", CollectionUtils.size(businessObjectDataKeys)); for (BusinessObjectDataKey businessObjectDataKey : businessObjectDataKeys) { retentionExpirationDestroyerWebClient.destroyBusinessObjectData(businessObjectDataKey); LOGGER.info("Successfully marked for destruction. Business object data {}", jsonHelper.objectToJson(businessObjectDataKey)); } LOGGER.info("Successfully processed {} business object data instances for destruction.", CollectionUtils.size(businessObjectDataKeys)); }  void performRetentionExpirationDestruction(File localInputFile, RegServerAccessParamsDto regServerAccessParamsDto);  }
@Test public void testPerformRetentionExpirationDestruction() throws Exception { File inputCsvFile = createLocalInputCsvFile(); RegServerAccessParamsDto regServerAccessParamsDto = RegServerAccessParamsDto.builder().withRegServerHost(WEB_SERVICE_HOSTNAME).withRegServerPort(WEB_SERVICE_HTTPS_PORT).withUseSsl(true) .withUsername(WEB_SERVICE_HTTPS_USERNAME).withPassword(WEB_SERVICE_HTTPS_PASSWORD).withTrustSelfSignedCertificate(true) .withDisableHostnameVerification(true).build(); retentionExpirationDestroyerController.performRetentionExpirationDestruction(inputCsvFile, regServerAccessParamsDto); }