Index: trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java	(revision 8604)
+++ trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java	(revision 8606)
@@ -15,10 +15,9 @@
 public class JCSCachedTileLoaderJobTest {
     private static class TestCachedTileLoaderJob extends JCSCachedTileLoaderJob<String, CacheEntry> {
+        private String url;
 
-        private int responseCode;
-
-        public TestCachedTileLoaderJob(int responseCode) throws IOException {
+        public TestCachedTileLoaderJob(String url) throws IOException {
             super(getCache(), 30000, 30000, null);
-            this.responseCode = responseCode;
+            this.url = url;
         }
 
@@ -35,5 +34,5 @@
         public URL getUrl() {
             try {
-                return new URL("http://httpstat.us/" + Integer.toString(responseCode));
+                return new URL(url);
             } catch (MalformedURLException e) {
                 throw new RuntimeException(e);
@@ -86,6 +85,19 @@
     }
 
+    @Test
+    public void testUnkownHost() throws Exception {
+        TestCachedTileLoaderJob job = new TestCachedTileLoaderJob("http://unkownhost.unkownhost/unkown");
+        Listener listener = new Listener();
+        job.submit(listener, true);
+        synchronized (listener) {
+            if (!listener.ready) {
+                listener.wait();
+            }
+        }
+        assertEquals("java.net.UnknownHostException: unkownhost.unkownhost", listener.attributes.getErrorMessage());
+    }
+
     public void testStatusCode(int responseCode) throws Exception {
-        TestCachedTileLoaderJob job = new TestCachedTileLoaderJob(responseCode);
+        TestCachedTileLoaderJob job = getStatusLoaderJob(responseCode);
         Listener listener = new Listener();
         job.submit(listener, true);
@@ -98,4 +110,9 @@
 
     }
+
+    private static TestCachedTileLoaderJob getStatusLoaderJob(int responseCode) throws IOException {
+        return new TestCachedTileLoaderJob("http://httpstat.us/" + responseCode);
+    }
+
 }
 
