Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/CommandListMutableTreeNode.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/CommandListMutableTreeNode.java	(revision 11023)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/CommandListMutableTreeNode.java	(revision 11024)
@@ -12,7 +12,12 @@
 public class CommandListMutableTreeNode extends DefaultMutableTreeNode {
 
-    protected transient PseudoCommand cmd;
-    protected int idx;
+    protected final PseudoCommand cmd;
+    protected final int idx;
 
+    /**
+     * Constructs a new {@code CommandListMutableTreeNode}.
+     * @param cmd command
+     * @param idx index
+     */
     public CommandListMutableTreeNode(PseudoCommand cmd, int idx) {
         super(new JLabel(cmd.getDescriptionText(), cmd.getDescriptionIcon(), JLabel.HORIZONTAL));
@@ -21,8 +26,16 @@
     }
 
+    /**
+     * Returns the command.
+     * @return the command
+     */
     public PseudoCommand getCommand() {
         return cmd;
     }
 
+    /**
+     * Returns the index.
+     * @return the index
+     */
     public int getIndex() {
         return idx;
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/CommandStackDialogTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/CommandStackDialogTest.java	(revision 11024)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/CommandStackDialogTest.java	(revision 11024)
@@ -0,0 +1,36 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.dialogs;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
+/**
+ * Unit tests of {@link CommandStackDialog} class.
+ */
+public class CommandStackDialogTest {
+
+    /**
+     * Setup tests
+     */
+    @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
+    public JOSMTestRules test = new JOSMTestRules().commands();
+
+    /**
+     * Unit test of {@link CommandStackDialog} class.
+     */
+    @Test
+    public void testCommandStackDialog() {
+        CommandStackDialog dlg = new CommandStackDialog();
+        dlg.showDialog();
+        assertTrue(dlg.isVisible());
+        dlg.hideDialog();
+        assertFalse(dlg.isVisible());
+    }
+}
