anchor.diff:      end,
   
       Path = lists:flatten([
  +        #idp_group{type = OriginGroupType, name = Origin},
           #idp_group{type = TopGroupType, name = hd(Groups)},
           [#idp_group{type = SubGroupsType, name = G, privileges = member} || G <- tl(Groups)]
       ]),
  
positive.code:         <<"urn:mace:egi.eu:group:fedcloud.egi.eu:role=vm_operator#aai.egi.eu">>,
          #{},
          #idp_entitlement{idp = egi, path = [
              #idp_group{type = team, name = <<"fedcloud.egi.eu">>, privileges = member}
          ], privileges = member}
      },
      {
          <<"urn:mace:egi.eu:group:fedcloud.egi.eu:child:role=member#aai.egi.eu">>,
          #{},
          #idp_entitlement{idp = egi, path = [
              #idp_group{type = team, name = <<"fedcloud.egi.eu">>, privileges = member},
              #idp_group{type = team, name = <<"child">>, privileges = member}
          ], privileges = member}
  
negative.code:         <<"urn:mace:egi.eu:group:egi-engage-members:role=admin#aai.egi.eu">>,
          #{},
          #idp_entitlement{idp = egi, path = [
              #idp_group{type = organization, name = <<"aai.egi.eu">>, privileges = member},
              #idp_group{type = team, name = <<"egi-engage-members">>, privileges = member}
          ], privileges = admin}
      },
      {
          <<"urn:mace:egi.eu:group:egi-engage-members:role=chair#other.origin.com">>,
          #{},
          #idp_entitlement{idp = egi, path = [
              #idp_group{type = organization, name = <<"other.origin.com">>, privileges = member},
              #idp_group{type = team, name = <<"egi-engage-members">>, privileges = member}
          ], privileges = admin}
      },
      {
          <<"urn:mace:egi.eu:bad-prefix:egi-engage-members:role=chair#other.origin.com">>,
          #{},
          {error, malformed}
      },
      {
          <<"urn:mace:egi.eu:group:group-without-origin">>,
          #{},
          {error, malformed}
      },
      {
          <<"unconfromant-group-name">>,
  