Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java	(revision 14535)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java	(revision 14536)
@@ -10,8 +10,6 @@
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.TreeMap;
 import java.util.concurrent.TimeUnit;
@@ -69,5 +67,5 @@
 
     private final Map<String, Map<ImageryInfo, List<String>>> errors = Collections.synchronizedMap(new TreeMap<>());
-    private final Set<String> workingURLs = Collections.synchronizedSet(new HashSet<>());
+    private final Map<String, byte[]> workingURLs = Collections.synchronizedMap(new TreeMap<>());
 
     private TMSCachedTileLoaderJob helper;
@@ -92,5 +90,8 @@
 
     private byte[] checkUrl(ImageryInfo info, String url) {
-        if (url != null && !url.isEmpty() && !workingURLs.contains(url)) {
+        if (url != null && !url.isEmpty()) {
+            if (workingURLs.containsKey(url)) {
+                return workingURLs.get(url);
+            }
             try {
                 Response response = HttpClient.create(new URL(url))
@@ -103,9 +104,11 @@
                 } else if (response.getResponseCode() >= 300) {
                     Logging.warn(url + " -> HTTP " + response.getResponseCode());
-                } else {
-                    workingURLs.add(url);
                 }
                 try {
-                    return Utils.readBytesFromStream(response.getContent());
+                    byte[] data = Utils.readBytesFromStream(response.getContent());
+                    if (response.getResponseCode() < 300) {
+                        workingURLs.put(url, data);
+                    }
+                    return data;
                 } finally {
                     response.disconnect();
