Index: applications/editors/josm/plugins/mapillary/build.gradle
===================================================================
--- applications/editors/josm/plugins/mapillary/build.gradle	(revision 32983)
+++ applications/editors/josm/plugins/mapillary/build.gradle	(revision 32984)
@@ -45,5 +45,5 @@
    * If not, choose the next higher number that is available, or the gradle build will break.
    */
-  compile(':josm:10583')
+  compile(':josm:10966')
   // For plugins it's irrelevant, which version is specified, always the latest version is used.
   requiredPlugin (name: 'apache-commons'){changing=true}
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/cache/MapillaryCache.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/cache/MapillaryCache.java	(revision 32983)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/cache/MapillaryCache.java	(revision 32984)
@@ -6,4 +6,5 @@
 import java.util.HashMap;
 
+import org.apache.commons.jcs.access.CacheAccess;
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.cache.BufferedImageCacheEntry;
@@ -44,5 +45,9 @@
    */
   public MapillaryCache(String key, Type type) {
-    super(MapillaryPlugin.getCache(), 50000, 50000, new HashMap<>());
+    this(MapillaryPlugin.getCache(), key, type);
+  }
+
+  protected MapillaryCache(CacheAccess<String, BufferedImageCacheEntry> cache, String key, Type type) {
+    super(cache, 50000, 50000, new HashMap<>());
     String k = null;
     URL u = null;
Index: applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/cache/MapillaryCacheTest.java
===================================================================
--- applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/cache/MapillaryCacheTest.java	(revision 32983)
+++ applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/cache/MapillaryCacheTest.java	(revision 32984)
@@ -9,7 +9,9 @@
 import java.io.IOException;
 
+import org.apache.commons.jcs.access.CacheAccess;
 import org.junit.Before;
 import org.junit.Test;
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.cache.BufferedImageCacheEntry;
 import org.openstreetmap.josm.data.cache.JCSCacheManager;
 import org.openstreetmap.josm.plugins.mapillary.AbstractTest;
@@ -18,14 +20,11 @@
 
 public class MapillaryCacheTest extends AbstractTest {
-
-  @Before
-  public void setUp() throws IOException {
-    MapillaryPlugin.cache = JCSCacheManager.getCache("mapillary", 10, 10000, 
-           new File(Main.pref.getPluginsDirectory(), "mapillary").getPath() + "/cache/");
-  }
   
   @Test
-  public void test() {
-    MapillaryCache cache = new MapillaryCache("00000", Type.FULL_IMAGE);
+  public void test() throws IOException {
+    CacheAccess<String, BufferedImageCacheEntry> cacheAccess = JCSCacheManager.getCache("mapillary", 10, 10000,
+      new File(Main.pref.getPluginsDirectory(), "mapillary").getPath() + "/cache/");
+
+    MapillaryCache cache = new MapillaryCache(cacheAccess, "00000", Type.FULL_IMAGE);
     assertNotEquals(null, cache.getUrl());
     assertNotEquals(null, cache.getCacheKey());
@@ -33,9 +32,9 @@
     assertFalse(cache.isObjectLoadable());
 
-    cache = new MapillaryCache("00000", Type.THUMBNAIL);
+    cache = new MapillaryCache(cacheAccess, "00000", Type.THUMBNAIL);
     assertNotEquals(null, cache.getCacheKey());
     assertNotEquals(null, cache.getUrl());
 
-    cache = new MapillaryCache(null, null);
+    cache = new MapillaryCache(cacheAccess, null, null);
     assertEquals(null, cache.getCacheKey());
     assertEquals(null, cache.getUrl());
