IsTT1DoseGivenForMother implements IRule { @Override public boolean apply(SafeMap reportFields) { return TT1_DOSE_VALUE.equals(reportFields.get(TT_DOSE_FIELD)); }  @Override boolean apply(SafeMap reportFields);  }
@Test public void shouldReturnTrueWhenTT1DoseIsGiven() { boolean didRuleSucceed = rule.apply(new SafeMap().put("ttDose", "tt1")); assertTrue(didRuleSucceed); }
@Test public void shouldReturnFalseWhenTT1DoseIsNotGiven() { boolean didRuleSucceed = rule.apply(new SafeMap().put("ttDose", "tt2")); assertFalse(didRuleSucceed); }