anchor.diff:                                  true ->
                                       throw(?ERROR_POSIX(?EACCES));
                                   false ->
  -                                    ?ALL_METADATA_SET_2
  +                                    AllDirectMetadata
                               end;
                           undefined ->
                               % When 'inherited' flag is set all ancestors json metadata
                               % are merged but for rest the first value found (which in
                               % this case is value directly set on file) is returned
  -                            ?ALL_METADATA_SET_2#{
  +                            AllDirectMetadata#{
                                   ?JSON_METADATA_KEY => json_utils:merge([
                                       ?JSON_METADATA_4,
                                       ?JSON_METADATA_5
  
positive.code:         required = [<<"metadata">>],
          correct_values = #{<<"metadata">> => [
              % Tests setting multiple xattrs at once
              #{?XATTR_1_KEY => ?XATTR_1_VALUE, ?XATTR_2_KEY => ?XATTR_2_VALUE}
              % Tests setting all types of xattr keys
              | lists:map(fun({Key, Val}) -> #{Key => Val} end, maps:to_list(?ALL_METADATA_SET_1))
          ]}
      },
  
  
negative.code:                             };
                          _ ->
                              % In share mode only metadata directly set on file is available
                              AllDirectMetadata
                      end;
                  {false, false} ->
                      #{};
  