@Test public void testCleanup() throws Exception { BatchReportClientFactory batchReportClientFactory = mock(BatchReportClientFactory.class); BatchReportClient batchReportClient = mock(BatchReportClient.class); doReturn(batchReportClient).when(batchReportClientFactory).getClient(); ComputeInheritedRulesFinalizationPlugin instance = new ComputeInheritedRulesFinalizationPlugin(batchReportClientFactory); WorkerParameters workerParameters = mock(WorkerParameters.class); HandlerIO handler = mock(HandlerIO.class); doReturn("container").when(handler).getContainerName(); instance.execute(workerParameters, handler); verify(batchReportClient).cleanupReport("container", ReportType.UNIT_COMPUTED_INHERITED_RULES_INVALIDATION); }
@Override public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException { cleanupBatchReport(handler); LOGGER.info("Computed inherited rules finalization succeeded"); return buildItemStatus(COMPUTE_INHERITED_RULES_FINALIZATION, StatusCode.OK, null); }
ComputeInheritedRulesFinalizationPlugin extends ActionHandler { @Override public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException { cleanupBatchReport(handler); LOGGER.info("Computed inherited rules finalization succeeded"); return buildItemStatus(COMPUTE_INHERITED_RULES_FINALIZATION, StatusCode.OK, null); } }
ComputeInheritedRulesFinalizationPlugin extends ActionHandler { @Override public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException { cleanupBatchReport(handler); LOGGER.info("Computed inherited rules finalization succeeded"); return buildItemStatus(COMPUTE_INHERITED_RULES_FINALIZATION, StatusCode.OK, null); } ComputeInheritedRulesFinalizationPlugin(); @VisibleForTesting  ComputeInheritedRulesFinalizationPlugin(BatchReportClientFactory batchReportClientFactory); }
ComputeInheritedRulesFinalizationPlugin extends ActionHandler { @Override public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException { cleanupBatchReport(handler); LOGGER.info("Computed inherited rules finalization succeeded"); return buildItemStatus(COMPUTE_INHERITED_RULES_FINALIZATION, StatusCode.OK, null); } ComputeInheritedRulesFinalizationPlugin(); @VisibleForTesting  ComputeInheritedRulesFinalizationPlugin(BatchReportClientFactory batchReportClientFactory); @Override ItemStatus execute(WorkerParameters param, HandlerIO handler); @Override void checkMandatoryIOParameter(HandlerIO handler); static String getId(); }
ComputeInheritedRulesFinalizationPlugin extends ActionHandler { @Override public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException { cleanupBatchReport(handler); LOGGER.info("Computed inherited rules finalization succeeded"); return buildItemStatus(COMPUTE_INHERITED_RULES_FINALIZATION, StatusCode.OK, null); } ComputeInheritedRulesFinalizationPlugin(); @VisibleForTesting  ComputeInheritedRulesFinalizationPlugin(BatchReportClientFactory batchReportClientFactory); @Override ItemStatus execute(WorkerParameters param, HandlerIO handler); @Override void checkMandatoryIOParameter(HandlerIO handler); static String getId();  }