Index: trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java	(revision 6420)
+++ trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java	(revision 6421)
@@ -4,4 +4,9 @@
 import org.junit.Assert;
 import org.junit.Test;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.Preferences;
+
+import java.io.BufferedReader;
+import java.net.URL;
 
 /**
@@ -66,3 +71,19 @@
         Assert.assertEquals("fedc", Utils.toHexString(new byte[]{(byte) 0xfe, (byte) 0xdc}));
     }
+
+    @Test
+    public void testOpenUrlGzip() throws Exception {
+        Main.pref = new Preferences();
+        final BufferedReader x = Utils.openURLReaderAndDecompress(new URL("http://www.openstreetmap.org/trace/1613906/data"), true);
+        Assert.assertTrue(x.readLine().startsWith("<?xml version="));
+        x.close();
+    }
+
+    @Test
+    public void testOpenUrlBzip() throws Exception {
+        Main.pref = new Preferences();
+        final BufferedReader x = Utils.openURLReaderAndDecompress(new URL("http://www.openstreetmap.org/trace/785544/data"), true);
+        Assert.assertTrue(x.readLine().startsWith("<?xml version="));
+        x.close();
+    }
 }
