Index: trunk/test/performance/org/openstreetmap/josm/data/osm/KeyValuePerformanceTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/data/osm/KeyValuePerformanceTest.java	(revision 16913)
+++ trunk/test/performance/org/openstreetmap/josm/data/osm/KeyValuePerformanceTest.java	(revision 17275)
@@ -2,19 +2,20 @@
 package org.openstreetmap.josm.data.osm;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotSame;
+import static org.junit.jupiter.api.Assertions.assertSame;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.security.SecureRandom;
 import java.util.ArrayList;
 import java.util.Random;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.commons.lang3.RandomStringUtils;
 import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.Timeout;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
+import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.PerformanceTestUtils;
 import org.openstreetmap.josm.PerformanceTestUtils.PerformanceTestTimer;
@@ -28,5 +29,6 @@
  * @author Michael Zangl
  */
-public class KeyValuePerformanceTest {
+@Timeout(value = 15*60, unit = TimeUnit.SECONDS)
+class KeyValuePerformanceTest {
     private static final int PUT_RUNS = 10000;
     private static final int GET_RUNS = 100000;
@@ -38,14 +40,7 @@
 
     /**
-     * Global timeout applied to all test methods.
-     */
-    @Rule
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public Timeout globalTimeout = Timeout.seconds(15*60);
-
-    /**
      * Prepare the test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().projection();
@@ -56,5 +51,5 @@
     @Test
     @SuppressFBWarnings(value = "DM_STRING_CTOR", justification = "test Strings that are interned and those that are not")
-    public void testMeasureStringEqualsIntern() {
+    void testMeasureStringEqualsIntern() {
         String str1Interned = "string1";
         String str1InternedB = "string1";
@@ -134,5 +129,5 @@
      */
     @Test
-    public void testKeyValuePut() {
+    void testKeyValuePut() {
         for (double tagNodeRatio : TAG_NODE_RATIOS) {
             int nodeCount = (int) (PUT_RUNS / tagNodeRatio);
@@ -158,5 +153,5 @@
     @Test
     @SuppressFBWarnings(value = "RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT")
-    public void testKeyValueGet() {
+    void testKeyValueGet() {
         for (double tagNodeRatio : TAG_NODE_RATIOS) {
             KeyValueDataGenerator generator = OsmDataGenerator.getKeyValue(tagNodeRatio);
@@ -179,5 +174,5 @@
      */
     @Test
-    public void testKeyValueGetKeys() {
+    void testKeyValueGetKeys() {
         for (double tagNodeRatio : TAG_NODE_RATIOS) {
             KeyValueDataGenerator generator = OsmDataGenerator.getKeyValue(tagNodeRatio);
@@ -202,5 +197,5 @@
     @Test
     @SuppressFBWarnings(value = "RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT")
-    public void testKeyValueGetKeysGet() {
+    void testKeyValueGetKeysGet() {
         for (double tagNodeRatio : TAG_NODE_RATIOS) {
             KeyValueDataGenerator generator = OsmDataGenerator.getKeyValue(tagNodeRatio);
Index: trunk/test/performance/org/openstreetmap/josm/data/osm/RoundingPerformanceTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/data/osm/RoundingPerformanceTest.java	(revision 16913)
+++ trunk/test/performance/org/openstreetmap/josm/data/osm/RoundingPerformanceTest.java	(revision 17275)
@@ -2,7 +2,7 @@
 package org.openstreetmap.josm.data.osm;
 
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.coor.LatLonTest;
@@ -13,5 +13,5 @@
  * Checks that rounding of coordinates is not too slow.
  */
-public class RoundingPerformanceTest {
+class RoundingPerformanceTest {
 
     private static double oldRoundToOsmPrecision(double value) {
@@ -25,5 +25,5 @@
     @Test
     @SuppressFBWarnings(value = "RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT")
-    public void testRounding() {
+    void testRounding() {
         final int n = 1000000;
         long start = System.nanoTime();
Index: trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRendererPerformanceTestParent.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRendererPerformanceTestParent.java	(revision 16913)
+++ trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRendererPerformanceTestParent.java	(revision 17275)
@@ -11,10 +11,10 @@
 import java.nio.file.Files;
 import java.nio.file.Paths;
+import java.util.concurrent.TimeUnit;
 
 import javax.imageio.ImageIO;
 
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.Timeout;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.data.Bounds;
@@ -30,5 +30,6 @@
  * Abstract superclass of {@code StyledMapRendererPerformanceTest} and {@code WireframeMapRendererPerformanceTest}.
  */
-public abstract class AbstractMapRendererPerformanceTestParent {
+@Timeout(value = 15*60, unit = TimeUnit.SECONDS)
+abstract class AbstractMapRendererPerformanceTestParent {
 
     private static final int IMG_WIDTH = 1400;
@@ -45,11 +46,4 @@
     private static DataSet dsOverpass;
     private static DataSet dsCity;
-
-    /**
-     * Global timeout applied to all test methods.
-     */
-    @Rule
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public Timeout globalTimeout = Timeout.seconds(15*60);
 
     protected static void load() throws Exception {
@@ -112,20 +106,20 @@
 
     @Test
-    public void testRestriction() throws Exception {
+    void testRestriction() throws Exception {
         test(700, dsRestriction, new Bounds(51.12, 14.147472381591795, 51.128, 14.162492752075195));
     }
 
     @Test
-    public void testRestrictionSmall() throws Exception {
+    void testRestrictionSmall() throws Exception {
         test(1500, dsRestriction, new Bounds(51.125, 14.147, 51.128, 14.152));
     }
 
     @Test
-    public void testMultipolygon() throws Exception {
+    void testMultipolygon() throws Exception {
         test(400, dsMultipolygon, new Bounds(60, -180, 85, -122));
     }
 
     @Test
-    public void testMultipolygonSmall() throws Exception {
+    void testMultipolygonSmall() throws Exception {
         test(850, dsMultipolygon, new Bounds(-90, -180, 90, 180));
     }
@@ -135,30 +129,30 @@
      * Complex polygon (Lake Ontario) with small download area.
      */
-    public void testOverpassDownload() throws Exception {
+    void testOverpassDownload() throws Exception {
         test(20, dsOverpass, new Bounds(43.4510496, -76.536684, 43.4643202, -76.4954853));
     }
 
     @Test
-    public void testCity() throws Exception {
+    void testCity() throws Exception {
         test(50, dsCity, new Bounds(53.51, 13.20, 53.59, 13.34));
     }
 
     @Test
-    public void testCitySmall() throws Exception {
+    void testCitySmall() throws Exception {
         test(70, dsCity, new Bounds(52, 11, 55, 14));
     }
 
     @Test
-    public void testCityPart1() throws Exception {
+    void testCityPart1() throws Exception {
         test(250, dsCity, new Bounds(53.56, 13.25, 53.57, 13.26));
     }
 
     @Test
-    public void testCityPart2() throws Exception {
+    void testCityPart2() throws Exception {
         test(200, dsCity, new Bounds(53.55, 13.29, 53.57, 13.30));
     }
 
     @Test
-    public void testCitySmallPart2() throws Exception {
+    void testCitySmallPart2() throws Exception {
         test(200, dsCity, new Bounds(53.56, 13.295, 53.57, 13.30));
     }
Index: trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRendererPerformanceTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRendererPerformanceTest.java	(revision 16913)
+++ trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRendererPerformanceTest.java	(revision 17275)
@@ -7,6 +7,6 @@
 import javax.imageio.ImageIO;
 
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
 
@@ -16,7 +16,7 @@
  * Performance test of {@code StyledMapRenderer}.
  */
-public class StyledMapRendererPerformanceTest extends AbstractMapRendererPerformanceTestParent {
+class StyledMapRendererPerformanceTest extends AbstractMapRendererPerformanceTestParent {
 
-    @BeforeClass
+    @BeforeAll
     public static void load() throws Exception {
         AbstractMapRendererPerformanceTestParent.load();
@@ -25,5 +25,5 @@
     }
 
-    @AfterClass
+    @AfterAll
     public static void clean() throws Exception {
         AbstractMapRendererPerformanceTestParent.clean();
Index: trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRendererPerformanceTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRendererPerformanceTest.java	(revision 16913)
+++ trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRendererPerformanceTest.java	(revision 17275)
@@ -2,18 +2,18 @@
 package org.openstreetmap.josm.data.osm.visitor.paint;
 
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
 
 /**
  * Performance test of {@code WireframeMapRenderer}.
  */
-public class WireframeMapRendererPerformanceTest extends AbstractMapRendererPerformanceTestParent {
+class WireframeMapRendererPerformanceTest extends AbstractMapRendererPerformanceTestParent {
 
-    @BeforeClass
+    @BeforeAll
     public static void load() throws Exception {
         AbstractMapRendererPerformanceTestParent.load();
     }
 
-    @AfterClass
+    @AfterAll
     public static void clean() throws Exception {
         AbstractMapRendererPerformanceTestParent.clean();
Index: trunk/test/performance/org/openstreetmap/josm/gui/mappaint/MapRendererPerformanceTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/gui/mappaint/MapRendererPerformanceTest.java	(revision 16913)
+++ trunk/test/performance/org/openstreetmap/josm/gui/mappaint/MapRendererPerformanceTest.java	(revision 17275)
@@ -1,4 +1,6 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.mappaint;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.awt.Color;
@@ -20,9 +22,9 @@
 import javax.imageio.ImageIO;
 
-import org.junit.AfterClass;
 import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.PerformanceTestUtils;
@@ -49,6 +51,4 @@
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
-import static org.junit.Assert.assertEquals;
-
 /**
  * Performance test of map renderer.
@@ -87,5 +87,5 @@
      * Setup tests
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules josmTestRules = new JOSMTestRules().main().projection().preferences().timeout(15 * 60 * 1000);
@@ -95,5 +95,5 @@
      * @throws Exception if any error occurs
      */
-    @BeforeClass
+    @BeforeAll
     public static void load() throws Exception {
         JOSMFixture.createPerformanceTestFixture().init(true);
@@ -179,5 +179,5 @@
      * Cleanup test environment.
      */
-    @AfterClass
+    @AfterAll
     public static void cleanUp() {
         setFilterStyleActive(false);
@@ -283,5 +283,5 @@
      */
     @Test
-    public void testPerformanceGenerate() throws IOException {
+    void testPerformanceGenerate() throws IOException {
         setFilterStyleActive(false);
         PerformanceTester test = new PerformanceTester();
@@ -322,5 +322,5 @@
      */
     @Test
-    public void testPerformanceDrawFeatures() throws IOException {
+    void testPerformanceDrawFeatures() throws IOException {
         testDrawFeature(null);
         for (Feature f : Feature.values()) {
@@ -352,5 +352,5 @@
     }
 
-    public static class BenchmarkData extends CapturingBenchmark {
+    static class BenchmarkData extends CapturingBenchmark {
 
         private List<StyleRecord> allStyleElems;
Index: trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSConditionPerformanceTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSConditionPerformanceTest.java	(revision 16913)
+++ trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSConditionPerformanceTest.java	(revision 17275)
@@ -4,5 +4,5 @@
 import java.util.EnumSet;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.PerformanceTestUtils;
 import org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.Op;
@@ -12,10 +12,10 @@
  * @author Michael Zangl
  */
-public class MapCSSConditionPerformanceTest {
+class MapCSSConditionPerformanceTest {
     /**
      * Test the performance of all OP entries.
      */
     @Test
-    public void testAllOps() {
+    void testAllOps() {
         // The JIT does some really heavy optimisations if it notices that other values are not used.
         // If we want to simulate a real scenario, we need to invoke every op several times to let the compiler
Index: trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSPerformanceTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSPerformanceTest.java	(revision 16913)
+++ trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSPerformanceTest.java	(revision 17275)
@@ -2,5 +2,5 @@
 package org.openstreetmap.josm.gui.mappaint.mapcss;
 
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.fail;
 
 import java.awt.Graphics2D;
@@ -10,6 +10,6 @@
 import java.util.Collection;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.BeforeAll;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.data.Bounds;
@@ -29,5 +29,5 @@
  *
  */
-public class MapCSSPerformanceTest {
+class MapCSSPerformanceTest {
 
     /* ------------------------ configuration section  ---------------------------- */
@@ -56,5 +56,5 @@
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void createJOSMFixture() {
         JOSMFixture.createPerformanceTestFixture().init(true);
Index: trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSourceFilterTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSourceFilterTest.java	(revision 16913)
+++ trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSourceFilterTest.java	(revision 17275)
@@ -2,8 +2,9 @@
 package org.openstreetmap.josm.gui.mappaint.mapcss;
 
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.Timeout;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.PerformanceTestUtils;
@@ -13,11 +14,10 @@
 import org.openstreetmap.josm.gui.mappaint.MultiCascade;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
 /**
  * Tests how fast {@link MapCSSStyleSource} finds the right style candidates for one object.
  * @author Michael Zangl
  */
-public class MapCSSStyleSourceFilterTest {
+@Timeout(value = 15*60, unit = TimeUnit.SECONDS)
+class MapCSSStyleSourceFilterTest {
 
     private static final int TEST_RULE_COUNT = 10000;
@@ -82,14 +82,7 @@
 
     /**
-     * Global timeout applied to all test methods.
-     */
-    @Rule
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public Timeout globalTimeout = Timeout.seconds(15*60);
-
-    /**
      * Prepare the test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void createJOSMFixture() {
         JOSMFixture.createPerformanceTestFixture().init(true);
@@ -100,5 +93,5 @@
      */
     @Test
-    public void testKeyValueRules() {
+    void testKeyValueRules() {
         KeyValueDataGenerator data = OsmDataGenerator.getKeyValue();
         data.generateDataSet();
@@ -111,5 +104,5 @@
      */
     @Test
-    public void testKeyOnlyRules() {
+    void testKeyOnlyRules() {
         KeyValueDataGenerator data = OsmDataGenerator.getKeyValue();
         data.generateDataSet();
@@ -122,5 +115,5 @@
      */
     @Test
-    public void testRegularExpressionRules() {
+    void testRegularExpressionRules() {
         KeyValueDataGenerator data = OsmDataGenerator.getKeyValue();
         data.generateDataSet();
@@ -133,5 +126,5 @@
      */
     @Test
-    public void testIsTrueRules() {
+    void testIsTrueRules() {
         KeyValueDataGenerator data = OsmDataGenerator.getKeyValue();
         data.generateDataSet();
Index: trunk/test/performance/org/openstreetmap/josm/io/OsmReaderPerformanceTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/io/OsmReaderPerformanceTest.java	(revision 16913)
+++ trunk/test/performance/org/openstreetmap/josm/io/OsmReaderPerformanceTest.java	(revision 17275)
@@ -2,5 +2,5 @@
 package org.openstreetmap.josm.io;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import java.io.ByteArrayInputStream;
@@ -10,15 +10,13 @@
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.concurrent.TimeUnit;
 
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.Timeout;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.PerformanceTestUtils;
 import org.openstreetmap.josm.PerformanceTestUtils.PerformanceTestTimer;
 import org.openstreetmap.josm.data.osm.DataSet;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -29,19 +27,13 @@
  * @author Michael Zangl
  */
-public class OsmReaderPerformanceTest {
+@Timeout(value = 15*60, unit = TimeUnit.SECONDS)
+class OsmReaderPerformanceTest {
     private static final int TIMES = 4;
     private static final String DATA_FILE = "nodist/data/neubrandenburg.osm.bz2";
 
     /**
-     * Global timeout applied to all test methods.
-     */
-    @Rule
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public Timeout globalTimeout = Timeout.seconds(15*60);
-
-    /**
      * Prepare the test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void createJOSMFixture() {
         JOSMFixture.createPerformanceTestFixture().init(true);
@@ -53,5 +45,5 @@
      */
     @Test
-    public void testCompressed() throws Exception {
+    void testCompressed() throws Exception {
         runTest("compressed (.osm.bz2)", false);
     }
@@ -62,5 +54,5 @@
      */
     @Test
-    public void testPlain() throws Exception {
+    void testPlain() throws Exception {
         runTest(".osm-file", true);
     }
