private static <T extends BaseGeocacheFilter> Pair<Geocache, T> prepareData(final GeocacheFilterType type, final Action1<Geocache> cacheSetter, final Action1<T> filterSetter) {
        final T filter = type.create();
        if (filterSetter != null) {
            filterSetter.call(filter);
        }
        final Geocache cache = new Geocache();
        if (cacheSetter != null) {
            cacheSetter.call(cache);
        }
        return new Pair<>(cache, filter);
    }
Standard method. Tests for a given cache and filter whether it is correctly filtered via logic AND DB!
main/src/androidTest/java/cgeo/geocaching/filters/GeocacheFilterTestUtils.java