def test_create_message(self):
     message = SMB2CreateAppInstanceId()
     message['app_instance_id'] = b"\xff" * 16
     expected = b"\x14\x00" \
                b"\x00\x00" \
                b"\xff\xff\xff\xff\xff\xff\xff\xff" \
                b"\xff\xff\xff\xff\xff\xff\xff\xff"
     actual = message.pack()
     assert len(message) == 20
     assert actual == expected
 def test_parse_message(self):
     actual = SMB2CreateAppInstanceId()
     data = b"\x14\x00" \
            b"\x00\x00" \
            b"\xff\xff\xff\xff\xff\xff\xff\xff" \
            b"\xff\xff\xff\xff\xff\xff\xff\xff"
     data = actual.unpack(data)
     assert len(actual) == 20
     assert data == b""
     assert actual['structure_size'].get_value() == 20
     assert actual['reserved'].get_value() == 0
     assert actual['app_instance_id'].get_value() == b"\xff" * 16