anchor.diff:                           'Tap','Write','XattrRead', 'XattrWrite']},
                          {<<"test">>,[]}]}},
               {privileges,[]},
  -            {type, local}]}},
  +            {domain, local}]}},
            {<<"test">>,
             {[{buckets,{[{<<"default">>,[]},
                          {<<"test">>,
  
positive.code:                          'Read','SimpleStats', 'SystemXattrRead', 'SystemXattrWrite',
                           'Tap','Write','XattrRead', 'XattrWrite']}]}},
              {privileges,[]},
              {type, local}]}}],
      ?assertEqual(Json, generate_json_45(Buckets, RoleDefinitions)).
  
negative.code:     MergedPermissions = [{Bucket, lists:umerge(Perm)} || {Bucket, Perm} <- ZippedPermissions],
      {MergedPermissions, NewRolesDict}.
  
  jsonify_user({UserName, Domain}, [{global, GlobalPermissions} | BucketPermissions]) ->
      Buckets = {buckets, {[{list_to_binary(BucketName), Permissions} ||
                               {BucketName, Permissions} <- BucketPermissions]}},
      Global = {privileges, GlobalPermissions},
      {list_to_binary(UserName), {[Buckets, Global, {domain, Domain}]}}.
  
  memcached_admin_json(AU, Buckets) ->
      jsonify_user({AU, local}, [{global, [all]} | [{Name, [all]} || Name <- Buckets]]).
  