@Test
    @Deprecated // This tests a deprecated implementation. A test for the replacement code already exists. Simply delete this when the deprecated code gets removed.
    public void testOneHost() throws Exception {
        // setup
        final DNSUtil.WeightedHostAddress host = new DNSUtil.WeightedHostAddress("host", 5222, false, 1, 1);

        // do magic
        final List<DNSUtil.WeightedHostAddress> result = DNSUtil.prioritize(new DNSUtil.WeightedHostAddress[]{host});

        // verify
        assertEquals( 1, result.size() );
        assertEquals(host, result.get(0));
    }
A basic check that verifies that when one hosts exists, it gets returned in the output.
xmppserver/src/test/java/org/jivesoftware/openfire/net/DNSUtilTest.java