Index: trunk/test/functional/org/openstreetmap/josm/gui/mappaint/StyleCacheTest.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/gui/mappaint/StyleCacheTest.java	(revision 17625)
+++ trunk/test/functional/org/openstreetmap/josm/gui/mappaint/StyleCacheTest.java	(revision 17809)
@@ -14,5 +14,4 @@
 
 import org.junit.jupiter.api.AfterAll;
-import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -53,5 +52,5 @@
     @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().projection().mapStyles().timeout(60000);
+    public JOSMTestRules test = new JOSMTestRules().main().preferences().projection().mapStyles().timeout(60000);
 
     /**
@@ -59,6 +58,6 @@
      * @throws Exception If an error occurred during load.
      */
-    @BeforeAll
-    public static void load() throws Exception {
+    @BeforeEach
+    public void load() throws Exception {
         img = new BufferedImage(IMG_WIDTH, IMG_HEIGHT, BufferedImage.TYPE_INT_ARGB);
         try (InputStream in = Compression.getUncompressedFileInputStream(new File("nodist/data/neubrandenburg.osm.bz2"))) {
@@ -158,9 +157,5 @@
                 StyleElementList sel = p.a;
                 assertNotNull(sel);
-                Integer k = counter.get(sel);
-                if (k == null) {
-                    k = 0;
-                }
-                counter.put(sel, k + 1);
+                counter.merge(sel, 1, Integer::sum);
             }
         }
