anchor.diff:      ?assertEqual(Batch9, Batch10),
   
       % Add measurements to overridden metric
  -    Measurements4 = lists:map(fun(I) -> {I, 2 * I} end, lists:seq(1, 10)),
  +    Measurements4 = lists:map(fun(I) -> {I, 2 * I} end, lists:seq(1, 2)),
       Batch11 = update_many(Id, Measurements4, {<<"TS2">>, <<"M3">>}, Batch10),
       ExpectedMap6 = ExpectedMap5#{
  -        {<<"TS2">>, <<"M3">>} => lists:reverse(lists:map(fun(I) -> {I, 2 * I} end, lists:seq(1, 10)))
  +        {<<"TS2">>, <<"M3">>} => lists:reverse(lists:map(fun(I) -> {I, 2 * I} end, lists:seq(1, 2)))
       },
       ?assertMatch(?LIST_OK_ANS(ExpectedMap6), ?LIST_ALL(Id, Batch11)),
   
       % Test time series overriding
       ConfigMapExtension6 = #{<<"TS1">> => #{
  -        <<"M0">> => #metric_config{resolution = 1, retention = 100, aggregator = last},
  -        <<"M1">> => #metric_config{resolution = 1, retention = 100, aggregator = max}
  +        <<"M0">> => #metric_config{resolution = 1, retention = 10, aggregator = last},
  +        <<"M1">> => #metric_config{resolution = 1, retention = 10, aggregator = max}
       }},
       Batch12 = extend_collection(Id, ConfigMapExtension6, #{time_series_conflict_resulution_strategy => override}, Batch11),
       ExpectedMap7 = (maps:remove({<<"TS1">>, <<"M2">>}, maps:remove({<<"TS1">>, <<"M3">>}, ExpectedMap6)))#{
  
positive.code:             [MetricsMap] = maps:values(TimeSeries),
              ?assertEqual(4, maps:size(MetricsMap)),
              lists:foreach(fun(#metric{head_data = #data_node{windows = Windows}}) ->
                  ?assertEqual(500, ts_windows:get_size(Windows))
              end, maps:values(MetricsMap)),
              TmpTailSizes
      end, TailSizes, maps:values(Batch2)),
      ?assertEqual([], RemainingTailSizes),
  
      ExpectedWindowsCounts = #{500 => 500, 1000 => 2500, 1500 => 3500, 2000 => 4500},
      ExpectedMap = maps:map(fun(_MetricId, #metric_config{retention = Retention}) ->
          lists:sublist(lists:reverse(Measurements), maps:get(Retention, ExpectedWindowsCounts))
      end, MetricsConfigs),
  
negative.code: 
      % Test overriding metric
      ConfigMapExtension5 = #{<<"TS2">> => #{
          <<"M2">> => #metric_config{resolution = 1, retention = 50, aggregator = last},
          <<"M3">> => #metric_config{resolution = 1, retention = 1000, aggregator = max},
          <<"M4">> => #metric_config{resolution = 1, retention = 10, aggregator = min}
      }},
      Batch9 = extend_collection(Id, ConfigMapExtension5, #{metric_conflict_resulution_strategy => override}, Batch8),
      ExpectedMap5 = ExpectedMap4#{
  