### Question:
FilterUtils { public static boolean filterDate(Filter filter, Date value) { SimpleDateFormat sdf = new SimpleDateFormat(SystemConstants.API_DATE_FORMAT); List<Double> filterValues = getTypedAllowedValues(filter, v -> { try { return (double) sdf.parse(v).getTime(); } catch (ParseException ex) { throw new RuntimeException(ex); } }); return filterDouble(filter, filterValues, value.getTime()); } private  FilterUtils(); static TransformingComparator createCaseInsensitiveComparator(); static boolean filterString(Filter filter, String value); static boolean filterBoolean(Filter filter, boolean value); static boolean filterInt(Filter filter, Integer value); static boolean filterLong(Filter filter, Long value); static boolean filterDate(Filter filter, Date value); static boolean filterDouble(Filter filter, double value);  }### Answer:
@Test public void shouldFilterDates() throws ParseException { SimpleDateFormat sdf = new SimpleDateFormat(SystemConstants.API_DATE_FORMAT); String dayString = "2018-12-01 00:00:00"; String nextDayString = "2018-12-02 00:00:00"; Date day = sdf.parse(dayString); Date nextDay = sdf.parse(nextDayString); assertTrue(filterDate(day, FilterOperator.EQUAL, dayString)); assertTrue(filterDate(nextDay, FilterOperator.NOT_EQUAL, dayString)); assertTrue(filterDate(nextDay, FilterOperator.GREATER, dayString)); assertTrue(filterDate(day, FilterOperator.LOWER, nextDayString)); }