CurrentFPMethodIsCondomRule implements IRule { @Override public boolean apply(SafeMap reportFields) { return CONDOM_FP_METHOD_VALUE.equalsIgnoreCase(reportFields.get(CURRENT_FP_METHOD_FIELD_NAME)); }  @Override boolean apply(SafeMap reportFields);  }
@Test public void shouldReturnFalseWhenCurrentFPMethodOfECIsNotCondom() { boolean didRuleSucceed = currentFPMethodIsCondomRule.apply(new SafeMap().put("currentMethod", "ocp")); assertFalse(didRuleSucceed); }
@Test public void shouldReturnTrueIfCurrentFPMethodOfTheECIsCondom() { boolean didRuleSucceed = currentFPMethodIsCondomRule.apply(new SafeMap().put("currentMethod", "condom")); assertTrue(didRuleSucceed); }