<NME> CalendarUtilsTest.java
<BEF> package cgeo.geocaching.utils;

import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.models.Geocache;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.enumerations.CacheType;

import java.util.Calendar;

import junit.framework.TestCase;

public class DateUtilsTest extends TestCase {

    public static void testDaysSince() {
        final Calendar start = Calendar.getInstance();
        for (int hour = 0; hour < 24; hour++) {
            start.set(Calendar.HOUR_OF_DAY, hour);
            assertThat(DateUtils.daysSince(start.getTimeInMillis())).isEqualTo(0);
        }
    }

    @Test
    public void testIsPastEvent() {
        final Calendar start = Calendar.getInstance();
        start.set(Calendar.HOUR_OF_DAY, 0);
        start.set(Calendar.MINUTE, 10);
        assertPastEvent(start, false);

        start.set(Calendar.HOUR_OF_DAY, 23);
        assertPastEvent(start, false);

        start.add(Calendar.DAY_OF_MONTH, -1);
        assertPastEvent(start, true);
    }

    private static void assertPastEvent(final Calendar start, final boolean expectedPast) {
        cache.setType(CacheType.EVENT);

        cache.setHidden(start.getTime());
        assertThat(DateUtils.isPastEvent(cache)).isEqualTo(expectedPast);
    }

    public static void testIsFuture() {
        final Calendar date = Calendar.getInstance();
        assertThat(DateUtils.isFuture(date)).isFalse();

        date.add(Calendar.DAY_OF_MONTH, 1);
        assertThat(DateUtils.isFuture(date)).isFalse();

        date.add(Calendar.DAY_OF_MONTH, 1);
        assertThat(DateUtils.isFuture(date)).isTrue();
    }
}
    }
}

<MSG> Rename DateUtils into CalendarUtils

cgeo uses android.text.format.DateUtils, having a utility class with the
same name in a different package might be confusing.

<DFF> @@ -5,17 +5,17 @@ import static org.assertj.core.api.Assertions.assertThat;
 import cgeo.geocaching.Geocache;
 import cgeo.geocaching.enumerations.CacheType;
 
-import java.util.Calendar;
-
 import junit.framework.TestCase;
 
-public class DateUtilsTest extends TestCase {
+import java.util.Calendar;
+
+public class CalendarUtilsTest extends TestCase {
 
     public static void testDaysSince() {
         final Calendar start = Calendar.getInstance();
         for (int hour = 0; hour < 24; hour++) {
             start.set(Calendar.HOUR_OF_DAY, hour);
-            assertThat(DateUtils.daysSince(start.getTimeInMillis())).isEqualTo(0);
+            assertThat(CalendarUtils.daysSince(start.getTimeInMillis())).isEqualTo(0);
         }
     }
 
@@ -37,17 +37,17 @@ public class DateUtilsTest extends TestCase {
         cache.setType(CacheType.EVENT);
 
         cache.setHidden(start.getTime());
-        assertThat(DateUtils.isPastEvent(cache)).isEqualTo(expectedPast);
+        assertThat(CalendarUtils.isPastEvent(cache)).isEqualTo(expectedPast);
     }
 
     public static void testIsFuture() {
         final Calendar date = Calendar.getInstance();
-        assertThat(DateUtils.isFuture(date)).isFalse();
+        assertThat(CalendarUtils.isFuture(date)).isFalse();
 
         date.add(Calendar.DAY_OF_MONTH, 1);
-        assertThat(DateUtils.isFuture(date)).isFalse();
+        assertThat(CalendarUtils.isFuture(date)).isFalse();
 
         date.add(Calendar.DAY_OF_MONTH, 1);
-        assertThat(DateUtils.isFuture(date)).isTrue();
+        assertThat(CalendarUtils.isFuture(date)).isTrue();
     }
 }

Rename DateUtils into CalendarUtils