Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/DNSName.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/DNSName.java	(revision 9343)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/DNSName.java	(revision 9344)
@@ -57,5 +57,5 @@
  * @since 7347
  */
-public class DNSName implements GeneralNameInterface {
+public final class DNSName implements GeneralNameInterface {
     private final String name;
 
@@ -100,4 +100,5 @@
     /**
      * Return the type of the GeneralName.
+     * @return the type of the GeneralName
      */
     @Override
Index: /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/DNSNameTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/DNSNameTest.java	(revision 9344)
+++ /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/DNSNameTest.java	(revision 9344)
@@ -0,0 +1,44 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.io.remotecontrol;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+
+import org.junit.Test;
+
+import nl.jqno.equalsverifier.EqualsVerifier;
+import nl.jqno.equalsverifier.Warning;
+
+/**
+ * Unit tests of {@link DNSName} class.
+ */
+public class DNSNameTest {
+
+    /**
+     * Unit test of {@link DNSName#DNSName} - null check.
+     * @throws IOException always (expected with null name)
+     */
+    @Test(expected = IOException.class)
+    public void testDNSNameNull() throws IOException {
+        new DNSName(null);
+    }
+
+    /**
+     * Unit test of {@link DNSName#DNSName} - nominal cases.
+     * @throws IOException never
+     */
+    @Test
+    public void testDNSNameNominal() throws IOException {
+        assertEquals("localhost", new DNSName("localhost").getName());
+        assertEquals("127.0.0.1", new DNSName("127.0.0.1").getName());
+    }
+
+    /**
+     * Unit test of methods {@link DNSName#equals} and {@link DNSName#hashCode}.
+     */
+    @Test
+    public void equalsContract() {
+        EqualsVerifier.forClass(DNSName.class).suppress(Warning.NULL_FIELDS).verify();
+    }
+}
