IsJsyBeneficiaryRule implements IRule { @Override public boolean apply(SafeMap reportFields) { return AllConstants.Form.BOOLEAN_TRUE_VALUE.equalsIgnoreCase(reportFields.get(JSY_BENEFICIARY)); }  @Override boolean apply(SafeMap reportFields);  }
@Test public void shouldReturnFalseWhenJsyBeneficiaryIsSetToFalse() throws Exception { boolean isJsyBeneficiary = rule.apply(new SafeMap(mapOf("isJSYBeneficiary", "no"))); assertFalse(isJsyBeneficiary); }
@Test public void shouldReturnTrueWhenJsyBeneficiaryIsSetToTrue() throws Exception { boolean isJsyBeneficiary = rule.apply(new SafeMap(mapOf("isJSYBeneficiary", "yes"))); assertTrue(isJsyBeneficiary); }