IsDeathWasCausedByFeverRelatedRule implements IRule { @Override public boolean apply(SafeMap reportFields) { return FEVER_RELATED_VALUE.equalsIgnoreCase(reportFields.get(DEATH_CAUSE)); }  @Override boolean apply(SafeMap reportFields);  }
@Test public void shouldReturnTrueIfDeathCauseWasFeverRelated() { boolean didRuleApply = rule.apply(new SafeMap(create("deathCause", "fever_related").map())); assertTrue(didRuleApply); }
@Test public void shouldReturnFalseIfDeathCauseWasNotFeverRelated() { boolean didRuleApply = rule.apply(new SafeMap(create("deathCause", "within_24hrs").map())); assertFalse(didRuleApply); }