'L{dns._OPTHeader.encode} packs the header fields and writes
them to a file like object passed in as an argument.'

def test_encode(self):

    b = BytesIO()
    OPTNonStandardAttributes.object().encode(b)
    self.assertEqual(b.getvalue(), OPTNonStandardAttributes.bytes())
