IsHypertensionDetectedForFirstTimeRule implements IRule { @Override public boolean apply(SafeMap reportFields) { return AllConstants.BOOLEAN_TRUE_VALUE.equalsIgnoreCase(reportFields.get(IS_HYPERTENSION_DETECTED_FOR_FIRST_TIME)); }  @Override boolean apply(SafeMap reportFields);  }
@Test public void shouldReturnTrueWhenHyperTensionDetected() { Map<String, String> reportFields = create("id", "mother id 1") .put("isHypertensionDetectedForFirstTime", "true") .map(); assertTrue(rule.apply(new SafeMap(reportFields))); }
@Test public void shouldReturnFalseWhenHyperTensionDetected() { Map<String, String> reportFields = create("id", "mother id 1") .put("isHypertensionDetectedForFirstTime", "false") .map(); assertFalse(rule.apply(new SafeMap(reportFields))); }