Index: trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java	(revision 16616)
+++ trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java	(revision 16617)
@@ -24,4 +24,7 @@
 
 import org.awaitility.Awaitility;
+import org.junit.jupiter.api.extension.AfterEachCallback;
+import org.junit.jupiter.api.extension.BeforeEachCallback;
+import org.junit.jupiter.api.extension.ExtensionContext;
 import org.junit.rules.TemporaryFolder;
 import org.junit.rules.TestRule;
@@ -79,5 +82,5 @@
  * @author Michael Zangl
  */
-public class JOSMTestRules implements TestRule {
+public class JOSMTestRules implements TestRule, AfterEachCallback, BeforeEachCallback {
     private int timeout = isDebugMode() ? -1 : 10 * 1000;
     private TemporaryFolder josmHome;
@@ -433,4 +436,26 @@
     }
 
+    @Override
+    public void beforeEach(ExtensionContext context) throws Exception {
+        Statement temporaryStatement = new Statement() {
+            @Override
+            public void evaluate() throws Throwable {
+                // do nothing
+            }
+        };
+        try {
+            this.apply(temporaryStatement,
+                    Description.createTestDescription(this.getClass(), "JOSMTestRules JUnit5 Compatibility"))
+                    .evaluate();
+        } catch (Throwable e) {
+            throw new Exception(e);
+        }
+    }
+
+    @Override
+    public void afterEach(ExtensionContext context) throws Exception {
+        // do nothing for now
+    }
+
     /**
      * Set up before running a test
