Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java	(revision 16159)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java	(revision 16160)
@@ -17,4 +17,5 @@
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.Map;
 import java.util.Objects;
@@ -49,6 +50,4 @@
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 
-import com.google.common.collect.ImmutableMap;
-
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
@@ -530,9 +529,9 @@
         this.paintSlippyMap();
 
-        Map<Integer, String> paletteMap = ImmutableMap.<Integer, String>builder()
-            .put(0xffffffff, "w")  // white
-            .put(0xff000000, "b")  // black
-            .put(0xfff0d1d1, "p")  // pink
-            .build();
+        Map<Integer, String> paletteMap = new HashMap<Integer, String>() {{
+            put(0xffffffff, "w");  // white
+            put(0xff000000, "b");  // black
+            put(0xfff0d1d1, "p");  // pink
+        }};
 
         Matcher rowMatcher = ImagePatternMatching.rowMatch(
@@ -680,11 +679,11 @@
         this.paintSlippyMap();
 
-        Map<Integer, String> paletteMap = ImmutableMap.<Integer, String>builder()
-            .put(0xff00ff00, "g")  // green
-            .put(0xff000000, "b")  // black
-            .put(0xff8ad16b, "v")  // viewport marker inner (pink+green mix)
-            .put(0xff00df00, "d")  // (shaded green)
-            .put(0xff8ac46b, "q")  // (shaded pink+green mix)
-            .build();
+        Map<Integer, String> paletteMap = new HashMap<Integer, String>() {{
+            put(0xff00ff00, "g");  // green
+            put(0xff000000, "b");  // black
+            put(0xff8ad16b, "v");  // viewport marker inner (pink+green mix)
+            put(0xff00df00, "d");  // (shaded green)
+            put(0xff8ac46b, "q");  // (shaded pink+green mix)
+        }};
 
         // assert downloaded areas are not drawn
@@ -852,11 +851,11 @@
         this.paintSlippyMap();
 
-        Map<Integer, String> paletteMap = ImmutableMap.<Integer, String>builder()
-            .put(0xff00ff00, "g")  // green
-            .put(0xff000000, "b")  // black
-            .put(0xff8ad16b, "v")  // viewport marker inner (pink+green mix)
-            .put(0xff00df00, "d")  // (shaded green)
-            .put(0xff8ac46b, "q")  // (shaded pink+green mix)
-            .build();
+        Map<Integer, String> paletteMap = new HashMap<Integer, String>() {{
+            put(0xff00ff00, "g");  // green
+            put(0xff000000, "b");  // black
+            put(0xff8ad16b, "v");  // viewport marker inner (pink+green mix)
+            put(0xff00df00, "d");  // (shaded green)
+            put(0xff8ac46b, "q");  // (shaded pink+green mix)
+        }};
 
         // the middle row should be entirely unshaded
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/actions/RelationEditorActionsTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/actions/RelationEditorActionsTest.java	(revision 16159)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/actions/RelationEditorActionsTest.java	(revision 16160)
@@ -14,6 +14,4 @@
 import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
 import org.openstreetmap.josm.testutils.mockers.JOptionPaneSimpleMocker;
-
-import com.google.common.collect.ImmutableMap;
 
 import mockit.Mock;
@@ -73,21 +71,20 @@
     public void testDeleteCurrentRelationAction() {
         TestUtils.assumeWorkingJMockit();
-        final JOptionPaneSimpleMocker jopsMocker = new JOptionPaneSimpleMocker(
-            ImmutableMap.<String, Object>of(
+        final JOptionPaneSimpleMocker jopsMocker = new JOptionPaneSimpleMocker() {
+            public String getStringFromOriginalMessage(Object originalMessage) {
+                return ((JTextComponent) ((Container) originalMessage).getComponent(0)).getText();
+            }
+        };
+        jopsMocker.getMockResultMap().put(
                 "<html>\n  <head>\n    \n  </head>\n  <body>\n    You are about to delete 1 "
                 + "relation:\n\n    "
                 + "<ul>\n      <li>\n        incomplete\n      </li>\n    </ul>\n    <br>\n    "
                 + "This step is rarely necessary and cannot be undone easily after being \n    "
-                + "uploaded to the server.<br>Do you really want to delete?\n  </body>\n</html>\n", JOptionPane.YES_OPTION,
+                + "uploaded to the server.<br>Do you really want to delete?\n  </body>\n</html>\n", JOptionPane.YES_OPTION);
+        jopsMocker.getMockResultMap().put(
                 "<html>\n  <head>\n    \n  </head>\n  <body>\n    You are about to delete incomplete "
                 + "objects.<br>This will cause problems \n    because you don\'t see the real object.<br>"
                 + "Do you really want to delete?\n  </body>\n</html>\n",
-                JOptionPane.YES_OPTION
-            )
-        ) {
-            public String getStringFromOriginalMessage(Object originalMessage) {
-                return ((JTextComponent) ((Container) originalMessage).getComponent(0)).getText();
-            }
-        };
+                JOptionPane.YES_OPTION);
 
         new DeleteCurrentRelationAction(relationEditorAccess).actionPerformed(null);
Index: /trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogTest.java	(revision 16159)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogTest.java	(revision 16160)
@@ -29,6 +29,4 @@
 import org.openstreetmap.josm.testutils.mockers.WindowMocker;
 
-import com.google.common.collect.ImmutableMap;
-
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import mockit.Invocation;
@@ -129,17 +127,5 @@
     public void testUploadAction() {
         TestUtils.assumeWorkingJMockit();
-        ExtendedDialogMocker edMocker = new ExtendedDialogMocker(
-            ImmutableMap.<String, Object>of(
-                "<html>Your upload comment is <i>empty</i>, or <i>very short</i>.<br /><br />This is "
-                + "technically allowed, but please consider that many users who are<br />watching changes "
-                + "in their area depend on meaningful changeset comments<br />to understand what is going "
-                + "on!<br /><br />If you spend a minute now to explain your change, you will make life<br />"
-                + "easier for many other mappers.</html>", "Revise",
-                "<html>You did not specify a source for your changes.<br />It is technically allowed, "
-                + "but this information helps<br />other users to understand the origins of the data."
-                + "<br /><br />If you spend a minute now to explain your change, you will make life"
-                + "<br />easier for many other mappers.</html>", "Revise"
-            )
-        ) {
+        ExtendedDialogMocker edMocker = new ExtendedDialogMocker() {
             @Mock
             void setupDialog(Invocation invocation) throws Exception {
@@ -159,4 +145,13 @@
             }
         };
+        edMocker.getMockResultMap().put("<html>Your upload comment is <i>empty</i>, or <i>very short</i>.<br /><br />This is "
+                + "technically allowed, but please consider that many users who are<br />watching changes "
+                + "in their area depend on meaningful changeset comments<br />to understand what is going "
+                + "on!<br /><br />If you spend a minute now to explain your change, you will make life<br />"
+                + "easier for many other mappers.</html>", "Revise");
+        edMocker.getMockResultMap().put("<html>You did not specify a source for your changes.<br />It is technically allowed, "
+                + "but this information helps<br />other users to understand the origins of the data."
+                + "<br /><br />If you spend a minute now to explain your change, you will make life"
+                + "<br />easier for many other mappers.</html>", "Revise");
 
         MockUploadDialog uploadDialog = new MockUploadDialog("comment", "source");
Index: /trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelperTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelperTest.java	(revision 16159)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelperTest.java	(revision 16160)
@@ -6,4 +6,6 @@
 import java.io.FileNotFoundException;
 import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -20,6 +22,4 @@
 import org.openstreetmap.josm.tools.ColorHelper;
 import org.xml.sax.SAXException;
-
-import com.google.common.collect.ImmutableMap;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@@ -45,8 +45,9 @@
     @Test
     public void testTicket12312() throws FileNotFoundException, IOException, SAXException {
-        final List<String> colors = calculateColors(TestUtils.getRegressionDataFile(12312, "single_trackpoint.gpx"),
-                ImmutableMap.of("colormode.dynamic-range", "true",
-                        "colormode", Integer.toString(ColorMode.VELOCITY.toIndex())),
-                1);
+        final Map<String, String> prefs = new HashMap<String, String>() {{
+            put("colormode.dynamic-range", "true");
+            put("colormode", Integer.toString(ColorMode.VELOCITY.toIndex()));
+        }};
+        final List<String> colors = calculateColors(TestUtils.getRegressionDataFile(12312, "single_trackpoint.gpx"), prefs, 1);
         assertEquals("[null]", colors.toString());
     }
@@ -60,5 +61,5 @@
     @Test
     public void testNone() throws IOException, SAXException {
-        final List<String> colors = calculateColors("nodist/data/2094047.gpx", ImmutableMap.of(), 10);
+        final List<String> colors = calculateColors("nodist/data/2094047.gpx", Collections.emptyMap(), 10);
         assertEquals("[#000000, #000000, #000000, #000000, #000000, #000000, #000000, #000000, #000000, #000000]", colors.toString());
     }
@@ -72,6 +73,6 @@
     @Test
     public void testVelocity() throws IOException, SAXException {
-        final List<String> colors = calculateColors("nodist/data/2094047.gpx",
-                ImmutableMap.of("colormode", Integer.toString(ColorMode.VELOCITY.toIndex())), 10);
+        final Map<String, String> prefs = Collections.singletonMap("colormode", Integer.toString(ColorMode.VELOCITY.toIndex()));
+        final List<String> colors = calculateColors("nodist/data/2094047.gpx", prefs, 10);
         assertEquals("[#000000, #FFAD00, #FFA800, #FFA800, #FF9E00, #FF9400, #FF7000, #FF7000, #FF8000, #FF9400]", colors.toString());
     }
@@ -85,8 +86,9 @@
     @Test
     public void testVelocityDynamic() throws IOException, SAXException {
-        final List<String> colors = calculateColors("nodist/data/2094047.gpx",
-                ImmutableMap.of("colormode.dynamic-range", "true",
-                        "colormode", Integer.toString(ColorMode.VELOCITY.toIndex())),
-                10);
+        final Map<String, String> prefs = new HashMap<String, String>() {{
+            put("colormode.dynamic-range", "true");
+            put("colormode", Integer.toString(ColorMode.VELOCITY.toIndex()));
+        }};
+        final List<String> colors = calculateColors("nodist/data/2094047.gpx", prefs, 10);
         assertEquals("[#000000, #00FFE0, #00FFC2, #00FFC2, #00FF75, #00FF3D, #99FF00, #94FF00, #38FF00, #00FF38]", colors.toString());
     }
@@ -100,6 +102,6 @@
     @Test
     public void testDirection() throws IOException, SAXException {
-        final List<String> colors = calculateColors("nodist/data/2094047.gpx",
-                ImmutableMap.of("colormode", Integer.toString(ColorMode.DIRECTION.toIndex())), 10);
+        final Map<String, String> prefs = Collections.singletonMap("colormode", Integer.toString(ColorMode.DIRECTION.toIndex()));
+        final List<String> colors = calculateColors("nodist/data/2094047.gpx", prefs, 10);
         assertEquals("[#000000, #EAEC25, #EDEA26, #EDE525, #ECD322, #EBB81D, #E85A0D, #E73708, #E84D0B, #EA8A15]", colors.toString());
     }
@@ -113,6 +115,6 @@
     @Test
     public void testTime() throws IOException, SAXException {
-        final List<String> colors = calculateColors("nodist/data/2094047.gpx",
-                ImmutableMap.of("colormode", Integer.toString(ColorMode.TIME.toIndex())), 10);
+        final Map<String, String> prefs = Collections.singletonMap("colormode", Integer.toString(ColorMode.TIME.toIndex()));
+        final List<String> colors = calculateColors("nodist/data/2094047.gpx", prefs, 10);
         assertEquals("[#000000, #FF0000, #FF0000, #FF0500, #FF0500, #FF0A00, #FF0A00, #FF1F00, #FF2E00, #FF3300]", colors.toString());
     }
Index: /trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTableTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTableTest.java	(revision 16159)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTableTest.java	(revision 16160)
@@ -20,6 +20,4 @@
 import org.openstreetmap.josm.testutils.mockers.ExtendedDialogMocker;
 import org.openstreetmap.josm.testutils.mockers.JOptionPaneSimpleMocker;
-
-import com.google.common.collect.ImmutableMap;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@@ -52,8 +50,7 @@
     public void testPreferencesTable() {
         TestUtils.assumeWorkingJMockit();
-        new JOptionPaneSimpleMocker(ImmutableMap.of(
-            "Please select the row to edit.", JOptionPane.OK_OPTION,
-            "Please select the row to delete.", JOptionPane.OK_OPTION
-        ));
+        final JOptionPaneSimpleMocker mocker = new JOptionPaneSimpleMocker();
+        mocker.getMockResultMap().put("Please select the row to edit.", JOptionPane.OK_OPTION);
+        mocker.getMockResultMap().put("Please select the row to delete.", JOptionPane.OK_OPTION);
         new ExtendedDialogMocker() {
             @Override
Index: /trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceTest.java	(revision 16159)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceTest.java	(revision 16160)
@@ -20,6 +20,4 @@
 import org.openstreetmap.josm.testutils.mockers.HelpAwareOptionPaneMocker;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import com.google.common.collect.ImmutableMap;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@@ -92,9 +90,7 @@
     @Test
     public void testNotifyDownloadResults() {
-        new HelpAwareOptionPaneMocker(ImmutableMap.<String, Object>builder()
-            .put("<html></html>", "OK")  // (buildDownloadSummary() output was empty)
-            .put("<html>Please restart JOSM to activate the downloaded plugins.</html>", "OK")
-            .build()
-        );
+        final HelpAwareOptionPaneMocker mocker = new HelpAwareOptionPaneMocker();
+        mocker.getMockResultMap().put("<html></html>", "OK");  // (buildDownloadSummary() output was empty)
+        mocker.getMockResultMap().put("<html>Please restart JOSM to activate the downloaded plugins.</html>", "OK");
 
         PluginDownloadTask task = new PluginDownloadTask(NullProgressMonitor.INSTANCE, Collections.<PluginInformation>emptyList(), "");
Index: /trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerJOSMTooOldTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerJOSMTooOldTest.java	(revision 16159)
+++ /trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerJOSMTooOldTest.java	(revision 16160)
@@ -28,5 +28,4 @@
 import com.github.tomakehurst.wiremock.junit.WireMockRule;
 import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@@ -117,9 +116,7 @@
         Config.getPref().putList("plugins", ImmutableList.of("dummy_plugin", "baz_plugin"));
 
-        final ExtendedDialogMocker edMocker = new ExtendedDialogMocker(ImmutableMap.<String, Object>builder()
-            .put(this.bazPluginVersionReqString, "Download Plugin")
-            .put(this.dummyPluginVersionReqString, "Download Plugin")
-            .build()
-        );
+        final ExtendedDialogMocker edMocker = new ExtendedDialogMocker();
+        edMocker.getMockResultMap().put(this.bazPluginVersionReqString, "Download Plugin");
+        edMocker.getMockResultMap().put(this.dummyPluginVersionReqString, "Download Plugin");
 
         Files.copy(this.referenceDummyJarOld.toPath(), this.targetDummyJar.toPath());
@@ -181,13 +178,9 @@
         Config.getPref().putList("plugins", ImmutableList.of("dummy_plugin", "baz_plugin"));
 
-        final ExtendedDialogMocker edMocker = new ExtendedDialogMocker(ImmutableMap.<String, Object>builder()
-            .put(this.bazPluginVersionReqString, "Download Plugin")
-            .put(this.dummyPluginVersionReqString, "Skip Download")
-            .build()
-        );
-        final HelpAwareOptionPaneMocker haMocker = new HelpAwareOptionPaneMocker(ImmutableMap.<String, Object>builder()
-            .put(this.dummyPluginFailedString, "OK")
-            .build()
-        );
+        final ExtendedDialogMocker edMocker = new ExtendedDialogMocker();
+        edMocker.getMockResultMap().put(this.bazPluginVersionReqString, "Download Plugin");
+        edMocker.getMockResultMap().put(this.dummyPluginVersionReqString, "Skip Download");
+        final HelpAwareOptionPaneMocker haMocker = new HelpAwareOptionPaneMocker();
+        haMocker.getMockResultMap().put(this.dummyPluginFailedString, "OK");
 
         Files.copy(this.referenceDummyJarOld.toPath(), this.targetDummyJar.toPath());
Index: /trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerMultiVersionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerMultiVersionTest.java	(revision 16159)
+++ /trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerMultiVersionTest.java	(revision 16160)
@@ -9,5 +9,7 @@
 import java.io.File;
 import java.nio.file.Files;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import org.junit.Before;
@@ -25,5 +27,4 @@
 import com.github.tomakehurst.wiremock.junit.WireMockRule;
 import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@@ -96,11 +97,12 @@
 
         final String quxNewerServePath = "/qux/newer.jar";
+        final Map<String, String> attrOverrides = new HashMap<String, String>() {{
+            put("7500_Plugin-Url", "432;http://localhost:" + pluginServerRule.port() + quxNewerServePath);
+            put("7499_Plugin-Url", "346;http://localhost:" + pluginServerRule.port() + "/not/served.jar");
+            put("6999_Plugin-Url", "345;http://localhost:" + pluginServerRule.port() + "/not/served/eithejar");
+        }};
         final PluginServer pluginServer = new PluginServer(
             new PluginServer.RemotePlugin(this.referenceBazJarOld),
-            new PluginServer.RemotePlugin(this.referenceQuxJarNewest, ImmutableMap.of(
-                "7500_Plugin-Url", "432;http://localhost:" + this.pluginServerRule.port() + quxNewerServePath,
-                "7499_Plugin-Url", "346;http://localhost:" + this.pluginServerRule.port() + "/not/served.jar",
-                "6999_Plugin-Url", "345;http://localhost:" + this.pluginServerRule.port() + "/not/served/either.jar"
-            ))
+            new PluginServer.RemotePlugin(this.referenceQuxJarNewest, attrOverrides)
         );
         pluginServer.applyToWireMockServer(this.pluginServerRule);
@@ -161,11 +163,12 @@
         TestUtils.assumeWorkingJMockit();
 
+        final Map<String, String> attrOverrides = new HashMap<String, String>() {{
+            put("7500_Plugin-Url", "432;http://localhost:" + pluginServerRule.port() + "/dont.jar");
+            put("7499_Plugin-Url", "346;http://localhost:" + pluginServerRule.port() + "/even.jar");
+            put("6999_Plugin-Url", "345;http://localhost:" + pluginServerRule.port() + "/bother.jar");
+        }};
         final PluginServer pluginServer = new PluginServer(
             new PluginServer.RemotePlugin(this.referenceBazJarOld),
-            new PluginServer.RemotePlugin(this.referenceQuxJarNewest, ImmutableMap.of(
-                "7500_Plugin-Url", "432;http://localhost:" + this.pluginServerRule.port() + "/dont.jar",
-                "7499_Plugin-Url", "346;http://localhost:" + this.pluginServerRule.port() + "/even.jar",
-                "6999_Plugin-Url", "345;http://localhost:" + this.pluginServerRule.port() + "/bother.jar"
-            ))
+            new PluginServer.RemotePlugin(this.referenceQuxJarNewest, attrOverrides)
         );
         pluginServer.applyToWireMockServer(this.pluginServerRule);
Index: /trunk/test/unit/org/openstreetmap/josm/testutils/mockers/JOptionPaneSimpleMocker.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/testutils/mockers/JOptionPaneSimpleMocker.java	(revision 16159)
+++ /trunk/test/unit/org/openstreetmap/josm/testutils/mockers/JOptionPaneSimpleMocker.java	(revision 16160)
@@ -14,7 +14,4 @@
 import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil.MessagePanel;
 import org.openstreetmap.josm.tools.Logging;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.primitives.Ints;
 
 import mockit.Invocation;
@@ -60,31 +57,22 @@
  */
 public class JOptionPaneSimpleMocker extends BaseDialogMockUp<JOptionPane> {
-    protected static final Map<Integer, int[]> optionTypePermittedResults = ImmutableMap.of(
-        JOptionPane.YES_NO_OPTION, new int[] {
-            JOptionPane.YES_OPTION,
-            JOptionPane.NO_OPTION,
-            JOptionPane.CLOSED_OPTION
-        },
-        JOptionPane.YES_NO_CANCEL_OPTION, new int[] {
-            JOptionPane.YES_OPTION,
-            JOptionPane.NO_OPTION,
-            JOptionPane.CANCEL_OPTION,
-            JOptionPane.CLOSED_OPTION
-        },
-        JOptionPane.OK_CANCEL_OPTION, new int[] {
-            JOptionPane.OK_OPTION,
-            JOptionPane.CANCEL_OPTION,
-            JOptionPane.CLOSED_OPTION
-        },
-        // it's hard to know much about DEFAULT_OPTION, so we can't really police anything here, so
-        // including all known options
-        JOptionPane.DEFAULT_OPTION, new int[] {
-            JOptionPane.OK_OPTION,
-            JOptionPane.CANCEL_OPTION,
-            JOptionPane.CLOSED_OPTION,
-            JOptionPane.YES_OPTION,
-            JOptionPane.NO_OPTION
-        }
-    );
+
+    private boolean isPermittedResult(int option, int value) {
+        if (option == JOptionPane.YES_NO_OPTION) {
+            return value == JOptionPane.YES_OPTION || value == JOptionPane.NO_OPTION || value == JOptionPane.CLOSED_OPTION;
+        } else if (option == JOptionPane.YES_NO_CANCEL_OPTION) {
+            return value == JOptionPane.YES_OPTION || value == JOptionPane.NO_OPTION
+                    || value == JOptionPane.CANCEL_OPTION || value == JOptionPane.CLOSED_OPTION;
+        } else if (option == JOptionPane.OK_CANCEL_OPTION) {
+            return value == JOptionPane.OK_OPTION || value == JOptionPane.CANCEL_OPTION || value == JOptionPane.CLOSED_OPTION;
+        } else if (option == JOptionPane.DEFAULT_OPTION) {
+            // it's hard to know much about DEFAULT_OPTION, so we can't really police anything here, so
+            // including all known options
+            return value == JOptionPane.OK_OPTION || value == JOptionPane.CANCEL_OPTION || value == JOptionPane.CLOSED_OPTION
+                    || value == JOptionPane.YES_OPTION || value == JOptionPane.NO_OPTION;
+        } else {
+            return false;
+        }
+    }
 
     protected final MessagePanelMocker messagePanelMocker;
@@ -286,5 +274,5 @@
             this.act(message);
             final Object result = this.getMockResultForMessage(message);
-            if (!(result instanceof Integer && Ints.contains(optionTypePermittedResults.get(optionType), (int) result))) {
+            if (!(result instanceof Integer && isPermittedResult(optionType, (int) result))) {
                 fail(String.format(
                     "Invalid result for showConfirmDialog with optionType %d: %s",
