Index: trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/RemoteControlTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/RemoteControlTest.java	(revision 10338)
+++ trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/RemoteControlTest.java	(revision 10339)
@@ -46,4 +46,16 @@
         JOSMFixture.createUnitTestFixture().init();
         RemoteControl.PROP_REMOTECONTROL_HTTPS_ENABLED.put(true);
+        deleteKeystore();
+
+        RemoteControl.start();
+        disableCertificateValidation();
+        httpBase = "http://127.0.0.1:"+Main.pref.getInteger("remote.control.port", 8111);
+        httpsBase = "https://127.0.0.1:"+Main.pref.getInteger("remote.control.https.port", 8112);
+    }
+
+    /**
+     * Deletes JOSM keystore, if it exists.
+     */
+    public static void deleteKeystore() {
         try {
             Files.deleteIfExists(Paths.get(
@@ -52,9 +64,4 @@
             Main.error(e);
         }
-
-        RemoteControl.start();
-        disableCertificateValidation();
-        httpBase = "http://127.0.0.1:"+Main.pref.getInteger("remote.control.port", 8111);
-        httpsBase = "https://127.0.0.1:"+Main.pref.getInteger("remote.control.https.port", 8112);
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookOsxTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookOsxTest.java	(revision 10338)
+++ trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookOsxTest.java	(revision 10339)
@@ -63,5 +63,5 @@
     @Test
     public void testOpenUrl() throws IOException {
-        if (Main.isPlatformOsx()) {
+        if (!Main.isPlatformWindows()) {
             hook.openUrl(Main.getJOSMWebsite());
         } else {
Index: trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java	(revision 10338)
+++ trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java	(revision 10339)
@@ -21,4 +21,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpsServer;
+import org.openstreetmap.josm.io.remotecontrol.RemoteControlTest;
 
 /**
@@ -88,4 +89,5 @@
     @Test
     public void testSetupHttpsCertificate() throws Exception {
+        RemoteControlTest.deleteKeystore();
         KeyStore ks = RemoteControlHttpsServer.loadJosmKeystore();
         TrustedCertificateEntry trustedCert = new KeyStore.TrustedCertificateEntry(ks.getCertificate(ks.aliases().nextElement()));
