@Test @RunWithCustomExecutor public void testExecute_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 { eliminationActionReportService.cleanupReport(param.getContainerName()); purgeReportService.cleanupReport(param.getContainerName()); LOGGER.info("Elimination action finalization succeeded"); return buildItemStatus(ELIMINATION_ACTION_FINALIZATION, StatusCode.OK, null); } catch (ProcessingStatusException e) { LOGGER.error( String.format("Elimination action finalization failed with status [%s]", e.getStatusCode()), e); return buildItemStatus(ELIMINATION_ACTION_FINALIZATION, e.getStatusCode(), e.getEventDetails()); } }
EliminationActionFinalizationHandler extends ActionHandler { @Override public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException { try { eliminationActionReportService.cleanupReport(param.getContainerName()); purgeReportService.cleanupReport(param.getContainerName()); LOGGER.info("Elimination action finalization succeeded"); return buildItemStatus(ELIMINATION_ACTION_FINALIZATION, StatusCode.OK, null); } catch (ProcessingStatusException e) { LOGGER.error( String.format("Elimination action finalization failed with status [%s]", e.getStatusCode()), e); return buildItemStatus(ELIMINATION_ACTION_FINALIZATION, e.getStatusCode(), e.getEventDetails()); } } }
EliminationActionFinalizationHandler extends ActionHandler { @Override public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException { try { eliminationActionReportService.cleanupReport(param.getContainerName()); purgeReportService.cleanupReport(param.getContainerName()); LOGGER.info("Elimination action finalization succeeded"); return buildItemStatus(ELIMINATION_ACTION_FINALIZATION, StatusCode.OK, null); } catch (ProcessingStatusException e) { LOGGER.error( String.format("Elimination action finalization failed with status [%s]", e.getStatusCode()), e); return buildItemStatus(ELIMINATION_ACTION_FINALIZATION, e.getStatusCode(), e.getEventDetails()); } } EliminationActionFinalizationHandler(); @VisibleForTesting  EliminationActionFinalizationHandler(
        EliminationActionReportService eliminationActionReportService,
        PurgeReportService purgeReportService); }
EliminationActionFinalizationHandler extends ActionHandler { @Override public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException { try { eliminationActionReportService.cleanupReport(param.getContainerName()); purgeReportService.cleanupReport(param.getContainerName()); LOGGER.info("Elimination action finalization succeeded"); return buildItemStatus(ELIMINATION_ACTION_FINALIZATION, StatusCode.OK, null); } catch (ProcessingStatusException e) { LOGGER.error( String.format("Elimination action finalization failed with status [%s]", e.getStatusCode()), e); return buildItemStatus(ELIMINATION_ACTION_FINALIZATION, e.getStatusCode(), e.getEventDetails()); } } EliminationActionFinalizationHandler(); @VisibleForTesting  EliminationActionFinalizationHandler(
        EliminationActionReportService eliminationActionReportService,
        PurgeReportService purgeReportService); @Override ItemStatus execute(WorkerParameters param, HandlerIO handler); @Override void checkMandatoryIOParameter(HandlerIO handler); static String getId(); }
EliminationActionFinalizationHandler extends ActionHandler { @Override public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException { try { eliminationActionReportService.cleanupReport(param.getContainerName()); purgeReportService.cleanupReport(param.getContainerName()); LOGGER.info("Elimination action finalization succeeded"); return buildItemStatus(ELIMINATION_ACTION_FINALIZATION, StatusCode.OK, null); } catch (ProcessingStatusException e) { LOGGER.error( String.format("Elimination action finalization failed with status [%s]", e.getStatusCode()), e); return buildItemStatus(ELIMINATION_ACTION_FINALIZATION, e.getStatusCode(), e.getEventDetails()); } } EliminationActionFinalizationHandler(); @VisibleForTesting  EliminationActionFinalizationHandler(
        EliminationActionReportService eliminationActionReportService,
        PurgeReportService purgeReportService); @Override ItemStatus execute(WorkerParameters param, HandlerIO handler); @Override void checkMandatoryIOParameter(HandlerIO handler); static String getId();  }