@Test
    public void testDNFState() throws IOException, ParserException {
        final String geocode = "GC3T1XG";
        try {
            final int cacheResource = R.raw.gc3t1xg_gsak_dnf;

            final Geocache cache = CgeoTestUtils.loadCacheFromResource(cacheResource);
            assertThat(cache.isDNF()).isTrue();

            final String gpxString = getGPXFromCache(geocode);
            assertTagValue(gpxString, "gsak:DNF", "true");
            assertTagValue(gpxString, "gsak:DNFDate", "2021-03-20T00:00:00Z");


            cache.setDNF(false);
            DataStore.saveCache(cache, EnumSet.of(LoadFlags.SaveFlag.DB));

            final String gpxNotDnfString = getGPXFromCache(geocode);
            assertThat(gpxNotDnfString).doesNotContain("gsak:DNF");
        } finally {
            DataStore.removeCache(geocode, LoadFlags.REMOVE_ALL);
        }
    }
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