@Test
// Everything works fine, everyone gets through.
public void testNewDNSServer() throws Exception {

    String format = "192.168.0.%d";
    byte[] ipv6Template = new byte[]{32, 1, 13, (byte) (184 & 0xFF), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
    InetAddress i6addr = Inet6Address.getByName("::1");
    InetAddress i4addr = Inet4Address.getByName("127.0.0.1");
    thread.newDNSServer(builder, format, ipv6Template, i4addr);
    assertTrue(thread.upstreamDnsServers.contains(i4addr));
    assertTrue(serversAdded.contains(InetAddress.getByName("192.168.0.2")));
    thread.newDNSServer(builder, format, ipv6Template, i6addr);
    assertTrue(thread.upstreamDnsServers.contains(i6addr));
    assertEquals(3, ipv6Template[ipv6Template.length - 1]);
    assertTrue(serversAdded.contains(InetAddress.getByAddress(ipv6Template)));
}