IsMotherHasFeverRule implements IRule { @Override public boolean apply(SafeMap reportFields) { return !(EMPTY_STRING.equalsIgnoreCase(reportFields.get(HAS_FEVER_FIELD))); }  @Override boolean apply(SafeMap reportFields);  }
@Test public void shouldReturnTrueIfMotherHasFever() { SafeMap safeMap = new SafeMap(create("hasFever", "High Fever").map()); boolean didRuleApply = rule.apply(safeMap); assertTrue(didRuleApply); }
@Test public void shouldReturnFalseIfMotherDoesNotHaveFever() { boolean didRuleApply = rule.apply(new SafeMap(create("hasFever", "").map())); assertFalse(didRuleApply); }