def METHOD_NAME():
    personne = CafBeneficiary(nir="1231231231231", soumis_droit_et_devoir=False)
    foyer = CafMsaInfosFoyer(
        date_cloture_rsa=None,
        motif_cloture_rsa=None,
        matricule="AAAAAAA",
        motif_suspension_versement_rsa=None,
        beneficiaries=[personne],
        sans_domicile_fixe="0",
        etat_droit_rsa="2",
    )
    beneficiary = CdbBeneficiaryInfos(
        right_rsa="rsa_droit_ouvert_versable",
        caf_number="AAAAAAA",
        is_homeless=False,
        subject_right_and_duty=False,
        rsa_closure_date=None,
        rsa_closure_reason=None,
        rsa_suspension_reason=None,
    )
    assert transform_cafMsaFoyer_to_beneficiary(personne, foyer) == beneficiary