public static void generateTestCaches(final Set<Integer> listIds, final String origName, final Geopoint origCoords, final int count) {

            for (int i = 0; i < count ; i++) {
            final Geocache gc = new Geocache();
            gc.setName(origName + " " + i);
            gc.setCoords(origCoords.project(90, (i / 100)).project(180, (i % 100)));
            gc.setType(CacheType.values()[i % 9]);
            gc.setGeocode("GCT" + i);
            gc.setDescription("test");
            gc.setLists(listIds);
            DataStore.saveCache(gc, EnumSet.of(LoadFlags.SaveFlag.DB));
        }
    }
generates 'count' caches in the database, starting with 'orig' and associating it with given listIds
main/src/androidTest/java/cgeo/geocaching/test/CgeoTestUtils.java