CasteIsSTRule implements IRule { @Override public boolean apply(SafeMap reportFields) { return ST_VALUE.equalsIgnoreCase(reportFields.get(CASTE)); }  @Override boolean apply(SafeMap reportFields);  }
@Test public void shouldReturnFalseWhenCasteIsNotST() { boolean didRuleSucceed = rule.apply(new SafeMap(mapOf("caste", "sc"))); assertFalse(didRuleSucceed); didRuleSucceed = rule.apply(new SafeMap(mapOf("caste", "c_others"))); assertFalse(didRuleSucceed); didRuleSucceed = rule.apply(new SafeMap(mapOf("caste", ""))); assertFalse(didRuleSucceed); }
@Test public void shouldReturnTrueWhenCasteIsSC() { boolean didRuleSucceed = rule.apply(new SafeMap(mapOf("caste", "st"))); assertTrue(didRuleSucceed); }