@Test
public void testHasIpV6Servers() throws Exception {

    Configuration.Item item0 = new Configuration.Item();
    Configuration.Item item1 = new Configuration.Item();
    config.ipV6Support = true;
    config.dnsServers.enabled = true;
    config.dnsServers.items.add(item0);
    config.dnsServers.items.add(item1);
    item0.location = "::1";
    item0.state = Configuration.Item.STATE_ALLOW;
    item1.location = "127.0.0.1";
    item1.state = Configuration.Item.STATE_ALLOW;
    List<InetAddress> servers = new ArrayList<>();
    assertTrue(thread.hasIpV6Servers(config, servers));
    config.ipV6Support = false;
    assertFalse(thread.hasIpV6Servers(config, servers));
    config.ipV6Support = true;
    item0.state = Configuration.Item.STATE_DENY;
    assertFalse(thread.hasIpV6Servers(config, servers));
    servers.add(Inet6Address.getByName("127.0.0.1"));
    assertFalse(thread.hasIpV6Servers(config, servers));
    servers.add(Inet6Address.getByName("::1"));
    assertTrue(thread.hasIpV6Servers(config, servers));
}