@Test
    public void testSameFieldsAfterExport() throws IOException, ParserException {
        final int cacheResource = R.raw.gc31j2h;
        CgeoTestUtils.loadCacheFromResource(cacheResource);

        final String exported = extractWaypoint(getGPXFromCache("GC31J2H"));
        final String imported = extractWaypoint(IOUtils.toString(CgeoTestUtils.getResourceStream(R.raw.gc31j2h), StandardCharsets.UTF_8));

        assertEqualTags(imported, exported, "time");
        assertEqualTags(imported, exported, "name");
        // desc is not the same, since imported files also contain owner and T/D there
        // url is different since we export direct urls, no redirection via coord.info
        assertEqualTags(imported, exported, "urlname");
        assertEqualTags(imported, exported, "sym");
        assertEqualTags(imported, exported, "type");

        assertEqualTags(imported, exported, "groundspeak:name");
        assertEqualTags(imported, exported, "groundspeak:placed_by");
        assertEqualTags(imported, exported, "groundspeak:type");
        assertEqualTags(imported, exported, "groundspeak:container");
        assertEqualTags(imported, exported, "groundspeak:difficulty");
        assertEqualTags(imported, exported, "groundspeak:terrain");
        assertEqualTags(imported, exported, "groundspeak:country");
        assertEqualTags(imported, exported, "groundspeak:state");
        // different newlines in hints (and all other text). that's okay
        assertEqualTags(imported, exported, "groundspeak:date");
    }
This test verifies that a loop of import, export, import leads to the same cache information.
main/src/androidTest/java/cgeo/geocaching/export/GpxSerializerTest.java