IsChildFemaleRule implements IRule { @Override public boolean apply(SafeMap reportFields) { return FEMALE_VALUE.equalsIgnoreCase(reportFields.get(GENDER)); }  @Override boolean apply(SafeMap reportFields);  }
@Test public void shouldReturnFalseWhenChildIsNotFemale() { boolean didRuleSucceed = rule.apply(new SafeMap(mapOf("gender", "male"))); assertFalse(didRuleSucceed); didRuleSucceed = rule.apply(new SafeMap(mapOf("gender", ""))); assertFalse(didRuleSucceed); }
@Test public void shouldReturnTrueWhenChildIsFemale() { boolean didRuleSucceed = rule.apply(new SafeMap(mapOf("gender", "female"))); assertTrue(didRuleSucceed); }