@Test
    public void oneMillisecondDifference() throws Exception {
        final Date d = new Date((FORMATTER.parse("2022-04-06").getTime() / MILLIS_PER_DAY) * MILLIS_PER_DAY);
        assertThat(FORMATTER.format(d)).isEqualTo("2022-04-06");
        final Date dDaySameLater = new Date(d.getTime() + 1);
        assertThat(FORMATTER.format(dDaySameLater)).isEqualTo("2022-04-06");
        final Date dDayBefore = new Date(d.getTime() - 1);
        assertThat(FORMATTER.format(dDayBefore)).isEqualTo("2022-04-05");

        assertSingle(c -> c.setHidden(dDayBefore), dd -> dd.setMinMaxDate(d, null), false);
        assertSingle(c -> c.setHidden(d), dd -> dd.setMinMaxDate(null, dDayBefore), false);

        assertSingle(c -> c.setHidden(dDaySameLater), dd -> dd.setMinMaxDate(null, d), true);
        assertSingle(c -> c.setHidden(d), dd -> dd.setMinMaxDate(dDaySameLater, null), true);
    }
This class tests the Date filters, using HIDDEN filter as an example
main/src/androidTest/java/cgeo/geocaching/filters/DateRangeGeocacheFilterTest.java