<NME> CacheSizeTest.java
<BEF> package cgeo.geocaching.enumerations;

import java.util.Locale;

import org.junit.Test;
import static org.assertj.core.api.Java6Assertions.assertThat;

public class CacheSizeTest {

    @Test
    public void testOrder() {
        assertThat(CacheSize.MICRO.comparable).isLessThan(CacheSize.SMALL.comparable);
        assertThat(CacheSize.SMALL.comparable).isLessThan(CacheSize.REGULAR.comparable);
        assertThat(CacheSize.REGULAR.comparable).isLessThan(CacheSize.LARGE.comparable);
    }

    @Test
    public void testGetById() {
        assertThat(CacheSize.getById("")).isEqualTo(CacheSize.UNKNOWN);
        assertThat(CacheSize.getById(null)).isEqualTo(CacheSize.UNKNOWN);
        assertThat(CacheSize.getById("random garbage")).isEqualTo(CacheSize.UNKNOWN);
        assertThat(CacheSize.getById("large")).isEqualTo(CacheSize.LARGE);
        assertThat(CacheSize.getById("LARGE")).isEqualTo(CacheSize.LARGE);
    }

    @Test
            assertEquals(size, CacheSize.getById(size.id.toUpperCase(Locale.US)));
        }
    }
}
        assertThat(CacheSize.getById("-1")).isEqualTo(CacheSize.UNKNOWN);
    }

    @Test
    public void testGetByIdVeryLarge() throws Exception {
        assertThat(CacheSize.getById("Very large")).isEqualTo(CacheSize.VERY_LARGE);
        assertThat(CacheSize.getById("very_large")).as("size from website icon").isEqualTo(CacheSize.VERY_LARGE);
    }

}

<MSG> integrate extremcaching.com

* cherry-pick existing commits and have some basic tests
* disable EC connector by default
* fix faked geocodes during GPX import
* parse wrongly encoded container size
<DFF> @@ -27,4 +27,11 @@ public class CacheSizeTest extends AndroidTestCase {
             assertEquals(size, CacheSize.getById(size.id.toUpperCase(Locale.US)));
         }
     }
+
+    public static void testGetByIdNumeric() {
+        assertEquals(CacheSize.REGULAR, CacheSize.getById("3"));
+        assertEquals(CacheSize.UNKNOWN, CacheSize.getById("0"));
+        assertEquals(CacheSize.UNKNOWN, CacheSize.getById("9"));
+        assertEquals(CacheSize.UNKNOWN, CacheSize.getById("-1"));
+    }
 }

integrate extremcaching.com