private void testUsername(final String username) {
        // pagePrefix / pagePostfix is part of the surrounding JS code around the username parameter
        final String pagePrefix = "\"publicGuid\":\"abcdef01-2345-6789-abcd-ef0123456789\",\"referenceCode\":\"PRABCDE\",\"id\":1234567,\"username\":\"";
        final String pagePostfix = "\",\"dateCreated\":\"2010-01-01T00:00:00\"";
        final String purifiedUsername = StringEscapeUtils.unescapeEcmaScript(username); // unescape JS-escaped Unicode characters
        assertThat(GCParser.getUsername(pagePrefix + username + pagePostfix)).isEqualTo(purifiedUsername);
    }
The c:geo application test. It can be used for tests that require an
application and/or context.
main/src/androidTest/java/cgeo/geocaching/CgeoApplicationTest.java