@Test @RunWithCustomExecutor public void should_transfer_reply_finalization_ok() throws Exception { ItemStatus itemStatus = instance.execute(params, handler); assertThat(itemStatus.getGlobalStatus()).isEqualTo(StatusCode.OK); verify(eliminationActionReportService).cleanupReport(any()); verify(purgeReportService).cleanupReport(any()); }
@Override public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException { try { transferReplyReportService.cleanupReport(param.getContainerName()); purgeReportService.cleanupReport(param.getContainerName()); LOGGER.info("Transfer reply finalization succeeded"); return buildItemStatus(TRANSFER_REPLY_FINALIZATION, StatusCode.OK, null); } catch (ProcessingStatusException e) { LOGGER.error( String.format("Transfer reply finalization failed with status [%s]", e.getStatusCode()), e); return buildItemStatus(TRANSFER_REPLY_FINALIZATION, e.getStatusCode(), e.getEventDetails()); } }
TransferReplyFinalizationPlugin extends ActionHandler { @Override public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException { try { transferReplyReportService.cleanupReport(param.getContainerName()); purgeReportService.cleanupReport(param.getContainerName()); LOGGER.info("Transfer reply finalization succeeded"); return buildItemStatus(TRANSFER_REPLY_FINALIZATION, StatusCode.OK, null); } catch (ProcessingStatusException e) { LOGGER.error( String.format("Transfer reply finalization failed with status [%s]", e.getStatusCode()), e); return buildItemStatus(TRANSFER_REPLY_FINALIZATION, e.getStatusCode(), e.getEventDetails()); } } }
TransferReplyFinalizationPlugin extends ActionHandler { @Override public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException { try { transferReplyReportService.cleanupReport(param.getContainerName()); purgeReportService.cleanupReport(param.getContainerName()); LOGGER.info("Transfer reply finalization succeeded"); return buildItemStatus(TRANSFER_REPLY_FINALIZATION, StatusCode.OK, null); } catch (ProcessingStatusException e) { LOGGER.error( String.format("Transfer reply finalization failed with status [%s]", e.getStatusCode()), e); return buildItemStatus(TRANSFER_REPLY_FINALIZATION, e.getStatusCode(), e.getEventDetails()); } } TransferReplyFinalizationPlugin(); @VisibleForTesting  TransferReplyFinalizationPlugin(
        TransferReplyReportService TransferReplyReportService,
        PurgeReportService purgeReportService); }
TransferReplyFinalizationPlugin extends ActionHandler { @Override public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException { try { transferReplyReportService.cleanupReport(param.getContainerName()); purgeReportService.cleanupReport(param.getContainerName()); LOGGER.info("Transfer reply finalization succeeded"); return buildItemStatus(TRANSFER_REPLY_FINALIZATION, StatusCode.OK, null); } catch (ProcessingStatusException e) { LOGGER.error( String.format("Transfer reply finalization failed with status [%s]", e.getStatusCode()), e); return buildItemStatus(TRANSFER_REPLY_FINALIZATION, e.getStatusCode(), e.getEventDetails()); } } TransferReplyFinalizationPlugin(); @VisibleForTesting  TransferReplyFinalizationPlugin(
        TransferReplyReportService TransferReplyReportService,
        PurgeReportService purgeReportService); @Override ItemStatus execute(WorkerParameters param, HandlerIO handler); @Override void checkMandatoryIOParameter(HandlerIO handler); static String getId(); }
TransferReplyFinalizationPlugin extends ActionHandler { @Override public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException { try { transferReplyReportService.cleanupReport(param.getContainerName()); purgeReportService.cleanupReport(param.getContainerName()); LOGGER.info("Transfer reply finalization succeeded"); return buildItemStatus(TRANSFER_REPLY_FINALIZATION, StatusCode.OK, null); } catch (ProcessingStatusException e) { LOGGER.error( String.format("Transfer reply finalization failed with status [%s]", e.getStatusCode()), e); return buildItemStatus(TRANSFER_REPLY_FINALIZATION, e.getStatusCode(), e.getEventDetails()); } } TransferReplyFinalizationPlugin(); @VisibleForTesting  TransferReplyFinalizationPlugin(
        TransferReplyReportService TransferReplyReportService,
        PurgeReportService purgeReportService); @Override ItemStatus execute(WorkerParameters param, HandlerIO handler); @Override void checkMandatoryIOParameter(HandlerIO handler); static String getId();  }