AutoClosePNCAction implements Action { @Override public void invoke(MilestoneEvent event, Map<String, String> extraData) { pncService.autoClosePNCCase(event.externalId()); } @Autowired  AutoClosePNCAction(PNCService pncService); @Override void invoke(MilestoneEvent event, Map<String, String> extraData);  }
@Test public void shouldDelegateCloseActionToPNCServiceForDueWindowAlerts() throws Exception { action.invoke(event("Case 1", "Schedule 1", "Milestone 1", WindowName.due, dueWindowStart, lateWindowStart, maxWindowStart), null); verify(pncService).autoClosePNCCase("Case 1"); }