Index: trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportExceptionHandlerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportExceptionHandlerTest.java	(revision 10885)
+++ trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportExceptionHandlerTest.java	(revision 10886)
@@ -2,9 +2,11 @@
 package org.openstreetmap.josm.tools.bugreport;
 
-import static org.junit.Assert.assertFalse;
+import java.util.concurrent.CountDownLatch;
 
-import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
-import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -12,20 +14,21 @@
  */
 public class BugReportExceptionHandlerTest {
-
     /**
-     * Setup tests.
+     * No dependencies
      */
-    @Before
-    public void setUp() {
-        JOSMFixture.createUnitTestFixture().init(true);
-    }
+    @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
+    public JOSMTestRules test = new JOSMTestRules();
 
     /**
      * Unit test for {@link BugReportExceptionHandler#handleException} method.
+     * @throws InterruptedException if the current thread is interrupted while waiting
      */
     @Test
-    public void testHandleException() {
+    public void testHandleException() throws InterruptedException {
+        CountDownLatch latch = new CountDownLatch(1);
+        BugReportQueue.getInstance().addBugReportHandler(e -> {latch.countDown(); return false;});
         BugReportExceptionHandler.handleException(new Exception("testHandleException"));
-        assertFalse(BugReportExceptionHandler.exceptionHandlingInProgress());
+        latch.await();
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportTest.java	(revision 10885)
+++ trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportTest.java	(revision 10886)
@@ -3,13 +3,64 @@
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
 
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+import org.junit.Rule;
 import org.junit.Test;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Tests the bug report class.
  * @author Michael Zangl
- * @since 10285
  */
 public class BugReportTest {
+    /**
+     * Preferences for the report text
+     */
+    @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
+    public JOSMTestRules test = new JOSMTestRules().preferences();
+
+    /**
+     * Test {@link BugReport#getReportText()}
+     */
+    @Test
+    public void testReportText() {
+        ReportedException e = interceptInChildMethod(new IOException("test-exception-message"));
+        e.put("test-key", "test-value");
+        String text = new BugReport(e).getReportText();
+
+        assertTrue(text.contains("test-exception-message"));
+        assertTrue(text.contains("interceptInChildMethod"));
+        assertTrue(text.contains("testReportText")); // stack trace
+        assertTrue(text.contains("test-key: test-value"));
+    }
+
+    /**
+     * Test {@link BugReport#intercept(Throwable)}
+     */
+    @Test
+    public void testIntercept() {
+        IOException base = new IOException("test");
+        ReportedException intercepted = interceptInChildMethod(base);
+        assertEquals(intercepted.getCause(), base);
+
+        StringWriter out = new StringWriter();
+        intercepted.printReportDataTo(new PrintWriter(out));
+
+        assertTrue(out.toString().contains("interceptInChildMethod")); // calling method.
+
+        assertSame(intercepted, BugReport.intercept(intercepted));
+    }
+
+    private ReportedException interceptInChildMethod(IOException base) {
+        return BugReport.intercept(base);
+    }
 
     /**
@@ -20,4 +71,5 @@
         assertEquals("BugReportTest#testGetCallingMethod", BugReport.getCallingMethod(1));
         assertEquals("BugReportTest#testGetCallingMethod", testGetCallingMethod2());
+        assertEquals("?", BugReport.getCallingMethod(100));
     }
 
