'L{dns.RRHeader.encode} encodes the record header\'s information and
writes it to the file-like object passed to it and
L{dns.RRHeader.decode} reads from a file-like object to re-construct a
L{dns.RRHeader} instance.'

def test_resourceRecordHeader(self):

    f = BytesIO()
    dns.RRHeader('test.org', 3, 4, 17).encode(f)
    f.seek(0, 0)
    result = dns.RRHeader()
    result.decode(f)
    self.assertEqual(result.name, dns.Name('test.org'))
    self.assertEqual(result.type, 3)
    self.assertEqual(result.cls, 4)
    self.assertEqual(result.ttl, 17)
