@Test
    @SuppressWarnings("PMD.JUnitTestsShouldIncludeAssert") // is done in called test method
    public void specialNumber() {
        assertSingle(c -> c.setDifficulty(5f), f -> {
        }, true);
        assertSingle(c -> c.setDifficulty(5f), f -> f.setSpecialNumber(5f, true), true);
        assertSingle(c -> c.setDifficulty(5f), f -> f.setSpecialNumber(5f, false), false);
        assertSingle(c -> c.setDifficulty(3f), f -> f.setSpecialNumber(5f, true), true);

        //combine with min/max
        assertSingle(c -> c.setDifficulty(5f), f -> {
            f.setSpecialNumber(5f, true);
            f.setMinMaxRange(1f, 4f);
        }, true);
        assertSingle(c -> c.setDifficulty(5f), f -> {
            f.setSpecialNumber(5f, false);
            f.setMinMaxRange(1f, 6f);
        }, false);

    }
This class tests the number range filters, using DIFFICULTY filter as an example
main/src/androidTest/java/cgeo/geocaching/filters/NumberRangeGeocacheFilterTest.java