def METHOD_NAME(self, mock_credential_offer_schema_dump):
    """
    Test serialization.
    """
    credential_offer = CredentialOffer(
        comment="shaken, not stirred",
        credential_preview=self.preview,
        offers_attach=[
            AttachDecorator.data_base64(
                mapping=self.indy_offer,
                ident=ATTACH_DECO_IDS[CREDENTIAL_OFFER],
            )
        ],
    )
    credential_offer_dict = credential_offer.serialize()
    mock_credential_offer_schema_dump.assert_called_once_with(credential_offer)
    assert credential_offer_dict is mock_credential_offer_schema_dump.return_value