### Question:
FilterUtils { public static boolean filterBoolean(Filter filter, boolean value) { FilterOperator operator = getFilterOperator(filter); boolean result = false; for (boolean filterValue : getTypedAllowedValues(filter, v -> Boolean.parseBoolean(v.toLowerCase()))) { switch (operator) { case EQUAL: case LIKE: result |= value == filterValue; break; case NOT_EQUAL: result |= value != filterValue; break; default: throw new UnsupportedOperationException(getUnsupportedOperatorMessage(filter)); } } return result; } 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 shouldFilterBooleans() { assertTrue(filterBoolean(true, FilterOperator.EQUAL, "true")); assertTrue(filterBoolean(false, FilterOperator.EQUAL, "false")); assertTrue(filterBoolean(true, FilterOperator.NOT_EQUAL, "false")); assertFalse(filterBoolean(true, FilterOperator.NOT_EQUAL, "true")); }