@Override
 protected void tearDown() throws Exception {
   cgeoapplication.getInstance().dropList(listId);
   cgeoapplication.getInstance().removeList(listId);
   deleteDirectory(tempDir);
   Settings.setStoreOfflineMaps(importCacheStaticMaps);
   Settings.setStoreOfflineWpMaps(importWpStaticMaps);
   super.tearDown();
 }
  @Override
  protected void setUp() throws Exception {
    super.setUp();

    tempDir = new File(System.getProperty("java.io.tmpdir"), "cgeogpxesTest");
    tempDir.mkdir();

    // workaround to get storage initialized
    cgeoapplication.getInstance().getAllHistoricCachesCount();
    listId = cgeoapplication.getInstance().createList("cgeogpxesTest");

    importCacheStaticMaps = Settings.isStoreOfflineMaps();
    Settings.setStoreOfflineMaps(true);
    importWpStaticMaps = Settings.isStoreOfflineWpMaps();
    Settings.setStoreOfflineWpMaps(true);
  }