Index: /trunk/src/org/openstreetmap/josm/io/GpxWriter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/GpxWriter.java	(revision 14080)
+++ /trunk/src/org/openstreetmap/josm/io/GpxWriter.java	(revision 14081)
@@ -9,4 +9,5 @@
 import java.io.PrintWriter;
 import java.nio.charset.StandardCharsets;
+import java.text.DateFormat;
 import java.util.Collection;
 import java.util.Date;
@@ -35,4 +36,6 @@
  */
 public class GpxWriter extends XmlWriter implements GpxConstants {
+
+    private final DateFormat gpxFormat = DateUtils.getGpxFormat();
 
     /**
@@ -117,5 +120,5 @@
                     Object val = obj.get(key);
                     if (val instanceof Date) {
-                        simpleTag(key, DateUtils.getGpxFormat().format(val));
+                        simpleTag(key, gpxFormat.format(val));
                     }
                 }
Index: /trunk/test/unit/org/openstreetmap/josm/TestUtils.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/TestUtils.java	(revision 14080)
+++ /trunk/test/unit/org/openstreetmap/josm/TestUtils.java	(revision 14081)
@@ -47,4 +47,5 @@
 import org.openstreetmap.josm.io.Compression;
 import org.openstreetmap.josm.testutils.FakeGraphics;
+import org.openstreetmap.josm.testutils.mockers.WindowMocker;
 import org.openstreetmap.josm.tools.JosmRuntimeException;
 import org.openstreetmap.josm.tools.Utils;
@@ -397,4 +398,17 @@
 
     /**
+     * Use to assume that JMockit is working with the current JVM.
+     */
+    public static void assumeWorkingJMockit() {
+        try {
+            // Workaround to https://github.com/jmockit/jmockit1/issues/534
+            // Inspired by https://issues.apache.org/jira/browse/SOLR-11606
+            new WindowMocker();
+        } catch (UnsupportedOperationException e) {
+            Assume.assumeNoException(e);
+        }
+    }
+
+    /**
      * Return WireMock server serving files under ticker directory
      * @param ticketId Ticket numeric identifier
Index: /trunk/test/unit/org/openstreetmap/josm/actions/ExitActionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/actions/ExitActionTest.java	(revision 14080)
+++ /trunk/test/unit/org/openstreetmap/josm/actions/ExitActionTest.java	(revision 14081)
@@ -7,4 +7,5 @@
 import org.junit.Test;
 import org.junit.contrib.java.lang.system.ExpectedSystemExit;
+import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.progress.swing.ProgressMonitorExecutor;
@@ -12,9 +13,8 @@
 import org.openstreetmap.josm.tools.ImageProvider;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import mockit.Invocation;
 import mockit.Mock;
 import mockit.MockUp;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -28,5 +28,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform();
+    public JOSMTestRules test = new JOSMTestRules().platform().main();
 
     /**
@@ -41,4 +41,5 @@
     @Test
     public void testActionPerformed() {
+        TestUtils.assumeWorkingJMockit();
         exit.expectSystemExitWithStatus(0);
 
Index: /trunk/test/unit/org/openstreetmap/josm/gui/io/AsynchronousUploadPrimitivesTaskTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/io/AsynchronousUploadPrimitivesTaskTest.java	(revision 14080)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/io/AsynchronousUploadPrimitivesTaskTest.java	(revision 14081)
@@ -11,4 +11,5 @@
 import org.junit.Rule;
 import org.junit.Test;
+import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.APIDataSet;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -49,4 +50,5 @@
     @Before
     public void bootStrap() {
+        TestUtils.assumeWorkingJMockit();
         new JOptionPaneSimpleMocker(ImmutableMap.of(
             "A background upload is already in progress. Kindly wait for it to finish before uploading new changes", JOptionPane.OK_OPTION
Index: /trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileActionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileActionTest.java	(revision 14080)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileActionTest.java	(revision 14081)
@@ -7,4 +7,5 @@
 import org.junit.Test;
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.testutils.mockers.JOptionPaneSimpleMocker;
@@ -30,4 +31,5 @@
     @Test
     public void testAction() {
+        TestUtils.assumeWorkingJMockit();
         new JOptionPaneSimpleMocker(ImmutableMap.of(
             "All the preferences of this group are default, nothing to save", JOptionPane.OK_OPTION
Index: /trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTableTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTableTest.java	(revision 14080)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTableTest.java	(revision 14081)
@@ -13,4 +13,5 @@
 import org.junit.Rule;
 import org.junit.Test;
+import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.gui.ExtendedDialog;
 import org.openstreetmap.josm.gui.preferences.advanced.PreferencesTable.AllSettingsTableModel;
@@ -50,4 +51,5 @@
     @Test
     public void testPreferencesTable() {
+        TestUtils.assumeWorkingJMockit();
         new JOptionPaneSimpleMocker(ImmutableMap.of(
             "Please select the row to edit.", JOptionPane.OK_OPTION,
Index: /trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceHighLevelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceHighLevelTest.java	(revision 14080)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceHighLevelTest.java	(revision 14081)
@@ -39,4 +39,5 @@
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import mockit.MockUp;
 
 /**
@@ -393,4 +394,5 @@
     @Test
     public void testUpdateOnlySelectedPlugin() throws Exception {
+        TestUtils.assumeWorkingJMockit();
         final PluginServer pluginServer = new PluginServer(
             new PluginServer.RemotePlugin(this.referenceDummyJarNew),
@@ -586,4 +588,5 @@
     @Test
     public void testUpdateWithNoAvailableUpdates() throws Exception {
+        TestUtils.assumeWorkingJMockit();
         final PluginServer pluginServer = new PluginServer(
             new PluginServer.RemotePlugin(this.referenceDummyJarOld),
@@ -724,6 +727,7 @@
     @Test
     public void testInstallWithoutRestartRequired() throws Exception {
+        TestUtils.assumeWorkingJMockit();
         final boolean[] loadPluginsCalled = new boolean[] {false};
-        new mockit.MockUp<PluginHandler>() {
+        new MockUp<PluginHandler>() {
             @mockit.Mock
             private void loadPlugins(
Index: /trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerJOSMTooOldTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerJOSMTooOldTest.java	(revision 14080)
+++ /trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerJOSMTooOldTest.java	(revision 14081)
@@ -96,4 +96,5 @@
     @Test
     public void testUpdatePluginsDownloadBoth() throws IOException {
+        TestUtils.assumeWorkingJMockit();
         final PluginServer pluginServer = new PluginServer(
             new PluginServer.RemotePlugin(this.referenceDummyJarNew),
@@ -159,4 +160,5 @@
     @Test
     public void testUpdatePluginsSkipOne() throws IOException {
+        TestUtils.assumeWorkingJMockit();
         final PluginServer pluginServer = new PluginServer(
             new PluginServer.RemotePlugin(this.referenceDummyJarNew),
@@ -237,4 +239,5 @@
     @Test
     public void testUpdatePluginsUnexpectedlyJOSMTooOld() throws IOException {
+        TestUtils.assumeWorkingJMockit();
         final PluginServer pluginServer = new PluginServer(
             new PluginServer.RemotePlugin(this.referenceDummyJarNew),
Index: /trunk/test/unit/org/openstreetmap/josm/testutils/mockers/WindowMocker.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/testutils/mockers/WindowMocker.java	(revision 14080)
+++ /trunk/test/unit/org/openstreetmap/josm/testutils/mockers/WindowMocker.java	(revision 14081)
@@ -13,5 +13,5 @@
  * MockUp for a {@link Window} which simply (and naively) makes its constructor(s) a no-op. This has
  * the advantage of removing the isHeadless check. Though if course it also leaves you with
- * uninintialized objects, and so of course they don't *necessarily* work properly. But often they
+ * uninitialized objects, and so of course they don't *necessarily* work properly. But often they
  * work *just enough* to behave how a test needs them to. Exercise left to the reader to discover
  * the limits here.
