Index: trunk/test/unit/org/openstreetmap/josm/tools/ExceptionUtilTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/ExceptionUtilTest.java	(revision 15079)
+++ trunk/test/unit/org/openstreetmap/josm/tools/ExceptionUtilTest.java	(revision 15084)
@@ -11,7 +11,7 @@
 import java.util.TimeZone;
 
-import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
-import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.io.ChangesetClosedException;
 import org.openstreetmap.josm.io.IllegalDataException;
@@ -22,6 +22,9 @@
 import org.openstreetmap.josm.io.OsmApiInitializationException;
 import org.openstreetmap.josm.io.auth.CredentialsManager;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.tools.date.DateUtils;
 import org.openstreetmap.josm.tools.date.DateUtilsTest;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -30,4 +33,11 @@
 public class ExceptionUtilTest {
 
+    /**
+     * Setup rule.
+     */
+    @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
+    public JOSMTestRules test = new JOSMTestRules().preferences().fakeAPI();
+
     private static String baseUrl;
     private static String serverUrl;
@@ -39,9 +49,7 @@
      * @throws Exception in case of error
      */
-    @BeforeClass
-    public static void setUp() throws Exception {
-        JOSMFixture.createUnitTestFixture().init();
+    @Before
+    public void setUp() throws Exception {
         OsmApi api = OsmApi.getOsmApi();
-        api.initialize(null);
         baseUrl = api.getBaseUrl();
         serverUrl = api.getServerUrl();
@@ -154,11 +162,12 @@
     @Test
     public void testExplainFailedAuthorisation() {
-        assertEquals("<html>Authorisation at the OSM server failed.<br></html>",
+        assertEquals("<html>Authorisation at the OSM server failed.<br>The server reported the following error:<br>"+
+                "'The server replied an error with code 0.'</html>",
                 ExceptionUtil.explainFailedAuthorisation(new OsmApiException("")));
-        assertEquals("<html>Authorisation at the OSM server failed.<br>The server reported the following error:<br>'header'</html>",
+        assertEquals("<html>Authorisation at the OSM server failed.<br>The server reported the following error:<br>'header (Code=403)'</html>",
                 ExceptionUtil.explainFailedAuthorisation(new OsmApiException(HttpURLConnection.HTTP_FORBIDDEN, "header", null)));
-        assertEquals("<html>Authorisation at the OSM server failed.<br>The server reported the following error:<br>'header (body)'</html>",
+        assertEquals("<html>Authorisation at the OSM server failed.<br>The server reported the following error:<br>'header. body (Code=403)'</html>",
                 ExceptionUtil.explainFailedAuthorisation(new OsmApiException(HttpURLConnection.HTTP_FORBIDDEN, "header", "body")));
-        assertEquals("<html>Authorisation at the OSM server failed.<br>The server reported the following error:<br>'body'</html>",
+        assertEquals("<html>Authorisation at the OSM server failed.<br>The server reported the following error:<br>'body (Code=403)'</html>",
                 ExceptionUtil.explainFailedAuthorisation(new OsmApiException(HttpURLConnection.HTTP_FORBIDDEN, null, "body")));
     }
@@ -247,5 +256,5 @@
     @Test
     public void testExplainMissingOAuthAccessTokenException() {
-        assertEquals("<html>Failed to authenticate at the OSM server 'https://api06.dev.openstreetmap.org/api'.<br>"+
+        assertEquals("<html>Failed to authenticate at the OSM server 'http://fake.xxx/api'.<br>"+
                 "You are using OAuth to authenticate but currently there is no<br>OAuth Access Token configured.<br>"+
                 "Please open the Preferences Dialog and generate or enter an Access Token.</html>",
