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