DnsMessage message = getMessage("/responseNaptr.dat");
assertEquals(ResponseCode.NO_ERROR, message.getHeaderSection().getResponseCode());
//System.out.println(message);
assertEquals(2, message.getAnswerSection().size());
NaptrRecord naptrRecord = (NaptrRecord) message.getAnswerSection().get(0);
assertEquals(90, naptrRecord.getOrder());
assertEquals(50, naptrRecord.getPreference());
assertEquals("S", naptrRecord.getFlags());
assertEquals("SIP+D2T", naptrRecord.getService());
assertEquals("", naptrRecord.getRegexp());
assertEquals("_sip._tcp.cipango.org", naptrRecord.getReplacement().toString());
naptrRecord = (NaptrRecord) message.getAnswerSection().get(1);
assertEquals(100, naptrRecord.getOrder());
assertEquals(50, naptrRecord.getPreference());
assertEquals("S", naptrRecord.getFlags());
assertEquals("SIP+D2U", naptrRecord.getService());
assertEquals("", naptrRecord.getRegexp());
assertEquals("_sip._udp.cipango.org", naptrRecord.getReplacement().toString());
}