@Test
    public void testParseSrvRecord() throws Exception
    {
        // Setup test fixture.
        final String input = "1 0 5269 xmpp.example.org";

        // Execute system under test.
        final SrvRecord result = SrvRecord.from(input.split(" "), true);

        // Verify results.
        assertNotNull(result);
        assertEquals(1, result.getPriority());
        assertEquals(0, result.getWeight());
        assertEquals(5269, result.getPort());
        assertEquals("xmpp.example.org", result.getHostname());
    }
Asserts that {@link SrvRecord#from(String[], boolean)} correctly parses an SRV record.
xmppserver/src/test/java/org/jivesoftware/openfire/net/SrvRecordTest.java