@@ -0,0 +1,1243 @@
+package cgeo.geocaching.connector.gc;%0A%0Aimport cgeo.CGeoTestCase;%0Aimport cgeo.geocaching.SearchResult;%0Aimport cgeo.geocaching.cgCache;%0Aimport cgeo.geocaching.cgData;%0Aimport cgeo.geocaching.enumerations.LoadFlags;%0Aimport cgeo.geocaching.utils.CancellableHandler;%0A%0Aimport android.os.Message;%0A%0Apublic class WaypointsTest extends CGeoTestCase %7B%0A%0A    public static CancellableHandler handler = new CancellableHandler() %7B%0A        @Override%0A        protected void handleRegularMessage(final Message message) %7B%0A            // Dummy%0A        %7D%0A    %7D;%0A%0A    private static cgCache downloadCache(final String geocode) %7B%0A        final SearchResult searchResult = cgCache.searchByGeocode(geocode, null, 0, true, handler);%0A        assertEquals(1, searchResult.getCount());%0A        return searchResult.getFirstCacheFromResult(LoadFlags.LOAD_WAYPOINTS);%0A    %7D%0A%0A    public static void testDownloadWaypoints() %7B%0A        // Check that repeated loads of %22GC33HXE%22 hold the right number of waypoints (issue #2430).%0A        final String GEOCODE = %22GC33HXE%22;%0A        cgData.removeCache(GEOCODE, LoadFlags.REMOVE_ALL);%0A        assertEquals(9, downloadCache(GEOCODE).getWaypoints().size());%0A        assertEquals(9, downloadCache(GEOCODE).getWaypoints().size());%0A    %7D%0A%0A%7D%0A

Add test for issue #2430