anchor.diff:                  }
               }}
           ],
  -        FileChanges
  +        get_changes_for_file(Config, WorkerP1, SpaceId, ChangesSpec, {path, FilePath}),
  +        ?ATTEMPTS
       ).
   
   
  
positive.code:             <<"fields">> => [<<"name">>]
          }
      },
      {ok, AllChanges} = get_changes(Config, WorkerP1, SpaceId, Json),
      RelevantChanges = [Change || Change <- AllChanges, map_size(Change) > 4],
      ?assert(length(RelevantChanges) >= 2),
  
      [LastChange, PreLastChange | _] = RelevantChanges,
  
      ?assertMatch(#{
          <<"fileMeta">> := #{
              <<"changed">> := false,
              <<"fields">> := #{
                  <<"name">> := Name
              }
          },
          <<"customMetadata">> := #{
              <<"changed">> := true,
              <<"fields">> := #{
                  <<"name">> := <<"value">>
              }
          }
      }, PreLastChange),
      ?assert(not maps:is_key(<<"times">>, PreLastChange)),
  
      ?assertMatch(#{
          <<"fileMeta">> := #{
              <<"changed">> := false,
              <<"fields">> := #{
                  <<"name">> := Name
              }
          },
          <<"times">> := #{
              <<"changed">> := true,
              <<"fields">> := #{
                  <<"atime">> := Time,
                  <<"mtime">> := Time,
                  <<"ctime">> := Time
              }
          }
      }, LastChange),
      ?assert(not maps:is_key(<<"customMetadata">>, LastChange)).
  
  
  changes_stream_on_multi_provider_test(Config) ->
  
negative.code:         lfm_proxy:update_times(WorkerP1, SessionId, {guid, FileGuid}, Time, Time, Time)
      end),
  
      ChangesSpec = #{<<"times">> => #{
          <<"fields">> => [<<"atime">>, <<"mtime">>, <<"ctime">>]
      }},
  
      % times docs are created on file creation and later updated using
      % 'lfm_proxy:update_times'. Changes stream aggregates events but with some
      % delay. Therefore it is possible for both events to be returned in changes
      % stream rather than the last one.
      % That is why fetching changes stream is retried ?ATTEMPTS number of times
      % to ensure events aggregation did happen and only one time event is
      % returned.
      ?assertMatch(
          [
              #{<<"times">> := #{
  