IsChildDiseaseReportedAsMeaslesRule implements IRule { @Override public boolean apply(SafeMap reportFields) { return MEASLES_VALUE.equalsIgnoreCase(reportFields.get(REPORT_CHILD_DISEASE)); }  @Override boolean apply(SafeMap reportFields);  }
@Test public void shouldReturnFalseWhenChildDiseaseReportedIsNotMeasles() { boolean didRuleSucceed = rule.apply(new SafeMap(mapOf("reportChildDisease", "diarrhea_dehydration"))); assertFalse(didRuleSucceed); }
@Test public void shouldReturnTrueWhenChildDiseaseReportedIsMeasles() { boolean didRuleSucceed = rule.apply(new SafeMap(mapOf("reportChildDisease", "measles"))); assertTrue(didRuleSucceed); }