@Test
public void testParsingAResponse() throws Exception
{
DnsMessage message = getMessage("/responseA.dat");
HeaderSection header = message.getHeaderSection();
assertEquals(0xECD1, header.getId());
assertEquals(OpCode.QUERY, header.getOpCode());
assertFalse(header.isTruncated());
assertTrue(header.isRecursionDesired());
assertTrue(header.isRecursionAvailable());
assertEquals(ResponseCode.NO_ERROR, header.getResponseCode());
QuestionSection question = message.getQuestionSection();
assertEquals(1, question.size());
Record record = question.get(0);
assertEquals(Type.A, record.getType());