Index: /trunk/test/unit/org/openstreetmap/josm/actions/ExitActionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/actions/ExitActionTest.java	(revision 18349)
+++ /trunk/test/unit/org/openstreetmap/josm/actions/ExitActionTest.java	(revision 18350)
@@ -7,4 +7,5 @@
 import java.awt.GraphicsEnvironment;
 
+import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
@@ -37,4 +38,9 @@
     public JOSMTestRules test = new JOSMTestRules().main();
 
+    @BeforeAll
+    static void beforeAll() {
+        assumeTrue(Utils.getJavaVersion() < 18 || "allow".equals(System.getProperty("java.security.manager")));
+    }
+
     /**
      * Unit test of {@link ExitAction#actionPerformed}
@@ -44,5 +50,4 @@
     void testActionPerformed() {
         TestUtils.assumeWorkingJMockit();
-        assumeTrue(Utils.getJavaVersion() < 18 || "allow".equals(System.getProperty("java.security.manager")));
 
         boolean[] workerShutdownCalled = {false};
