### Question:
DateHelper { public boolean isFieldExpired(Map<String, Object> body) { for (String key : Arrays.asList("endDate", "exitWithdrawDate")) { if (body.containsKey(key)) { return isFieldExpired(body, key, false); } } return false; }  String getFilterDate(boolean useGracePeriod); DateTime getNowMinusGracePeriod(); boolean isFieldExpired(Map<String, Object> body); boolean isFieldExpired(Map<String, Object> body, String fieldName); boolean isFieldExpired(Map<String, Object> body, String fieldName, boolean useGracePeriod); DateTime getDate(Map<String, Object> body, String fieldName); boolean isLhsBeforeRhs(DateTime lhs, DateTime rhs); static DateTimeFormatter getDateTimeFormat(); static Criteria getExpiredCriteria(); static Criteria getExpiredCriteria(String endDateField);  }### Answer:
@Test public void testIsFieldExpired() { Map<String, Object> body = generateEntityBody(); Assert.assertTrue(dateHelper.isFieldExpired(body, "endDate", false)); body.put("exitWithdrawDate", "2070-10-25"); Assert.assertFalse(dateHelper.isFieldExpired(body, "exitWithdrawDate", false)); }