### Question:
AdvancedFilterableSupport implements AdvancedFilterable,
        Serializable { public boolean isValidFilter(Filter filter) { assert filter != null : "filter must not be null"; if (filter instanceof Between) { return isFilterable(((Between) filter).getPropertyId()); } else if (filter instanceof Compare) { return isFilterable(((Compare) filter).getPropertyId()); } else if (filter instanceof IsNull) { return isFilterable(((IsNull) filter).getPropertyId()); } else if (filter instanceof Like) { return isFilterable(((Like) filter).getPropertyId()); } else if (filter instanceof SimpleStringFilter) { return isFilterable(((SimpleStringFilter) filter).getPropertyId()); } else if (filter instanceof AbstractJunctionFilter) { for (Filter f : ((AbstractJunctionFilter) filter).getFilters()) { if (!isValidFilter(f)) { return false; } } } return true; }  void addListener(ApplyFiltersListener listener); void removeListener(ApplyFiltersListener listener); Collection<Object> getFilterablePropertyIds(); @SuppressWarnings("unchecked") void setFilterablePropertyIds(Collection<?> propertyIds); void setFilterablePropertyIds(Object... propertyIds); boolean isFilterable(Object propertyId); boolean isValidFilter(Filter filter); List<Filter> getFilters(); List<Filter> getAppliedFilters(); void setApplyFiltersImmediately(boolean applyFiltersImmediately); boolean isApplyFiltersImmediately(); void applyFilters(); boolean hasUnappliedFilters(); @SuppressWarnings("unchecked") static Path<String> getPropertyPath(From<?, ?> root,
            Object propertyId); static Path<X> getPropertyPathTyped(From<X, Y> root,
            Object propertyId); void addFilter(Filter filter); void removeFilter(Filter filter); void removeAllFilters();  }### Answer:
@Test public void testIsValid_CustomFilter() { assertTrue(testObject.isValidFilter(filterMock)); }