@Test @RunWithCustomExecutor public void testExecuteSuccess() throws Exception { instance.execute(params, handler); verify(purgeReportService) .exportAccessionRegisters(VitamThreadUtils.getVitamSession().getRequestId()); }
@Override public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException { try { exportAccessionRegister(param.getContainerName()); LOGGER.info("Purge accession register preparation succeeded"); return buildItemStatus(actionId, StatusCode.OK, null); } catch (ProcessingStatusException e) { LOGGER.error( String.format("Purge accession register preparation failed with status [%s]", e.getStatusCode()), e); return buildItemStatus(actionId, e.getStatusCode(), e.getEventDetails()); } }
PurgeAccessionRegisterPreparationHandler extends ActionHandler { @Override public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException { try { exportAccessionRegister(param.getContainerName()); LOGGER.info("Purge accession register preparation succeeded"); return buildItemStatus(actionId, StatusCode.OK, null); } catch (ProcessingStatusException e) { LOGGER.error( String.format("Purge accession register preparation failed with status [%s]", e.getStatusCode()), e); return buildItemStatus(actionId, e.getStatusCode(), e.getEventDetails()); } } }
PurgeAccessionRegisterPreparationHandler extends ActionHandler { @Override public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException { try { exportAccessionRegister(param.getContainerName()); LOGGER.info("Purge accession register preparation succeeded"); return buildItemStatus(actionId, StatusCode.OK, null); } catch (ProcessingStatusException e) { LOGGER.error( String.format("Purge accession register preparation failed with status [%s]", e.getStatusCode()), e); return buildItemStatus(actionId, e.getStatusCode(), e.getEventDetails()); } } PurgeAccessionRegisterPreparationHandler(String actionId); @VisibleForTesting protected  PurgeAccessionRegisterPreparationHandler(
        String actionId, PurgeReportService purgeReportService); }
PurgeAccessionRegisterPreparationHandler extends ActionHandler { @Override public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException { try { exportAccessionRegister(param.getContainerName()); LOGGER.info("Purge accession register preparation succeeded"); return buildItemStatus(actionId, StatusCode.OK, null); } catch (ProcessingStatusException e) { LOGGER.error( String.format("Purge accession register preparation failed with status [%s]", e.getStatusCode()), e); return buildItemStatus(actionId, e.getStatusCode(), e.getEventDetails()); } } PurgeAccessionRegisterPreparationHandler(String actionId); @VisibleForTesting protected  PurgeAccessionRegisterPreparationHandler(
        String actionId, PurgeReportService purgeReportService); @Override ItemStatus execute(WorkerParameters param, HandlerIO handler); @Override void checkMandatoryIOParameter(HandlerIO handler); }
PurgeAccessionRegisterPreparationHandler extends ActionHandler { @Override public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException { try { exportAccessionRegister(param.getContainerName()); LOGGER.info("Purge accession register preparation succeeded"); return buildItemStatus(actionId, StatusCode.OK, null); } catch (ProcessingStatusException e) { LOGGER.error( String.format("Purge accession register preparation failed with status [%s]", e.getStatusCode()), e); return buildItemStatus(actionId, e.getStatusCode(), e.getEventDetails()); } } PurgeAccessionRegisterPreparationHandler(String actionId); @VisibleForTesting protected  PurgeAccessionRegisterPreparationHandler(
        String actionId, PurgeReportService purgeReportService); @Override ItemStatus execute(WorkerParameters param, HandlerIO handler); @Override void checkMandatoryIOParameter(HandlerIO handler);  }