ActionService { public void reportForIndicator(String anmIdentifier, ActionData actionData) { allActions.add(new Action("", anmIdentifier, actionData)); } @Autowired  ActionService(AllActions allActions, AllMothers allMothers, AllChildren allChildren, AllEligibleCouples allEligibleCouples); List<Action> getNewAlertsForANM(String anmIdentifier, long timeStamp); void alertForBeneficiary(BeneficiaryType beneficiaryType, String caseID, String scheduleName, String visitCode, AlertStatus alertStatus, DateTime startDate, DateTime expiryDate); void markAllAlertsAsInactive(String entityId); void markAlertAsInactive(String anmId, String entityId, String scheduleName); void markAlertAsClosed(String caseId, String anmIdentifier, String visitCode, String completionDate); void closeMother(String caseId, String anmIdentifier, String reasonForClose); void reportForIndicator(String anmIdentifier, ActionData actionData); void deleteReportActions();  }
@Test public void shouldReportForIndicator() { ActionData summaryActionData = ActionData.reportForIndicator("ANC", "30", new Gson().toJson(asList(new MonthSummaryDatum("3", "2012", "2", "2", asList("CASE 5", "CASE 6"))))); service.reportForIndicator("ANM X", summaryActionData); verify(allActions).add(new Action("", "ANM X", summaryActionData)); }