IsChildDiseaseReportedAsMalariaRule implements IRule { @Override public boolean apply(SafeMap reportFields) { return MALARIA_VALUE.equalsIgnoreCase(reportFields.get(REPORT_CHILD_DISEASE)); }  @Override boolean apply(SafeMap reportFields);  }
@Test public void shouldReturnFalseWhenChildDiseaseReportedIsNotMalaria() { boolean didRuleSucceed = rule.apply(new SafeMap(mapOf("reportChildDisease", "diarrhea_dehydration"))); assertFalse(didRuleSucceed); }
@Test public void shouldReturnTrueWhenChildDiseaseReportedIsMalaria() { boolean didRuleSucceed = rule.apply(new SafeMap(mapOf("reportChildDisease", "malaria"))); assertTrue(didRuleSucceed); }