def METHOD_NAME(self):
    def prepare_result(item):
        return etree.tostring(item, pretty_print=True)
    before, after = self.serialize(self.spec, xml_serializer)
    self.assertEqual(prepare_result(before), prepare_result(after))
    self.assertIsInstance(before, etree._Element)
    before, after = self.serialize(self.workflow, xml_serializer)
    if before is not None:
        self.assertEqual(prepare_result(before), prepare_result(after))