anchor.diff:              <<"step">> => ?RAND_INT(5, 25)
           }
       end, ?RAND_INT(30, 50)),
  -    SrcStoreSchemaDraft = ?SRC_LIST_STORE_SCHEMA_DRAFT(IteratedItemDataSpec, IteratedItems),
  -
  -    DstStoreSchemaId = <<"dst_st">>,
  -    DstStoreSchemaDraft = #atm_store_schema_draft{
  -        id = DstStoreSchemaId,
  -        type = range,
  -        config = #atm_range_store_config{}
  -    },
  -
  -    map_results_to_dst_store_test_base(
  -        [SrcStoreSchemaDraft, DstStoreSchemaDraft],
  -        IteratedItemDataSpec,
  -        IteratedItems,
  -        DstStoreSchemaId,
  -        range,
  -        #atm_range_store_content_update_options{}
  -    ).
  +
  +    map_results_to_global_store_test_base(#map_results_to_global_store_test_spec{
  +        iterated_item_spec = #atm_data_spec{type = atm_range_type},
  +        iterated_items = IteratedItems,
  +        dst_store_type = range,
  +        dst_store_config = #atm_range_store_config{},
  +        dst_store_update_options = #atm_range_store_content_update_options{}
  +    }).
   
   
   map_results_to_single_value_store_test() ->
       IteratedItemDataSpec = #atm_data_spec{type = atm_object_type},
  -    IteratedItems = gen_random_object_list(),
  -    SrcStoreSchemaDraft = ?SRC_LIST_STORE_SCHEMA_DRAFT(IteratedItemDataSpec, IteratedItems),
  -
  -    DstStoreSchemaId = <<"dst_st">>,
  -    DstStoreSchemaDraft = #atm_store_schema_draft{
  -        id = DstStoreSchemaId,
  -        type = single_value,
  -        config = #atm_single_value_store_config{item_data_spec = IteratedItemDataSpec}
  -    },
  -
  -    map_results_to_dst_store_test_base(
  -        [SrcStoreSchemaDraft, DstStoreSchemaDraft],
  -        IteratedItemDataSpec,
  -        IteratedItems,
  -        DstStoreSchemaId,
  -        single_value,
  -        #atm_single_value_store_content_update_options{}
  -    ).
  +
  +    map_results_to_global_store_test_base(#map_results_to_global_store_test_spec{
  +        iterated_item_spec = IteratedItemDataSpec,
  +        iterated_items = gen_random_object_list(),
  +        dst_store_type = single_value,
  +        dst_store_config = #atm_single_value_store_config{item_data_spec = IteratedItemDataSpec},
  +        dst_store_update_options = #atm_single_value_store_content_update_options{}
  +    }).
   
   
   map_results_to_time_series_store_test() ->
  -    IteratedItemDataSpec = ?ANY_MEASUREMENT_DATA_SPEC,
  -    IteratedItems = gen_random_time_series_measurements(),
  -    SrcStoreSchemaDraft = ?SRC_LIST_STORE_SCHEMA_DRAFT(IteratedItemDataSpec, IteratedItems),
  -
  -    DstStoreSchemaId = <<"dst_st">>,
  -    DstStoreSchemaDraft = #atm_store_schema_draft{
  -        id = DstStoreSchemaId,
  -        type = time_series,
  -        config = ?ATM_TIME_SERIES_STORE_CONFIG
  -    },
  -
  -    map_results_to_dst_store_test_base(
  -        [SrcStoreSchemaDraft, DstStoreSchemaDraft],
  -        IteratedItemDataSpec,
  -        IteratedItems,
  -        DstStoreSchemaId,
  -        time_series,
  -        #atm_time_series_store_content_update_options{dispatch_rules = ?ATM_TIME_SERIES_DISPATCH_RULES}
  -    ).
  +    map_results_to_global_store_test_base(#map_results_to_global_store_test_spec{
  +        iterated_item_spec = ?ANY_MEASUREMENT_DATA_SPEC,
  +        iterated_items = gen_random_time_series_measurements(),
  +        dst_store_type = time_series,
  +        dst_store_config = ?ATM_TIME_SERIES_STORE_CONFIG,
  +        dst_store_update_options = #atm_time_series_store_content_update_options{
  +            dispatch_rules = ?ATM_TIME_SERIES_DISPATCH_RULES
  +        }
  +    }).
   
   
   map_results_to_tree_forest_store_test() ->
       IteratedItemDataSpec = #atm_data_spec{type = atm_file_type},
  -
       FileObjects = onenv_file_test_utils:create_and_sync_file_tree(
           user1, ?SPACE_SELECTOR, lists_utils:generate(fun() -> #file_spec{} end, 30)
       ),
  
positive.code: 
  map_results_to_audit_log_store_test() ->
      IteratedItemDataSpec = #atm_data_spec{type = atm_integer_type},
      IteratedItems = lists:seq(20, 200, 4),
      SrcStoreSchemaDraft = ?SRC_LIST_STORE_SCHEMA_DRAFT(IteratedItemDataSpec, IteratedItems),
  
      DstStoreSchemaId = <<"dst_st">>,
      DstStoreSchemaDraft = #atm_store_schema_draft{
          id = DstStoreSchemaId,
          type = audit_log,
          config = #atm_audit_log_store_config{log_content_data_spec = IteratedItemDataSpec}
      },
  
      map_results_to_dst_store_test_base(
          [SrcStoreSchemaDraft, DstStoreSchemaDraft],
          IteratedItemDataSpec,
          IteratedItems,
          DstStoreSchemaId,
          audit_log,
          #atm_audit_log_store_content_update_options{function = append}
      ).
  
  
  map_results_to_list_store_test() ->
      IteratedItemDataSpec = #atm_data_spec{type = atm_string_type},
      IteratedItems = lists_utils:generate(fun() -> ?RAND_STR() end, ?RAND_INT(30, 50)),
      SrcStoreSchemaDraft = ?SRC_LIST_STORE_SCHEMA_DRAFT(IteratedItemDataSpec, IteratedItems),
  
      DstStoreSchemaId = <<"dst_st">>,
      DstStoreSchemaDraft = #atm_store_schema_draft{
          id = DstStoreSchemaId,
          type = list,
          config = #atm_list_store_config{item_data_spec = IteratedItemDataSpec}
      },
  
      map_results_to_dst_store_test_base(
          [SrcStoreSchemaDraft, DstStoreSchemaDraft],
          IteratedItemDataSpec,
          IteratedItems,
          DstStoreSchemaId,
          list,
          #atm_list_store_content_update_options{function = append}
      ).
  
  
  map_results_to_range_store_test() ->
      IteratedItemDataSpec = #atm_data_spec{type = atm_range_type},
      IteratedItems = lists_utils:generate(fun() ->
          #{
              <<"start">> => ?RAND_INT(0, 100),
  
negative.code:     }
  ).
  
  -record(map_results_to_global_store_test_spec, {
      iterated_item_spec :: atm_data_spec:record(),
      iterated_items :: [automation:item()],
      dst_store_type :: automation:store_type(),
      dst_store_config :: atm_store_config:record(),
      dst_store_update_options :: atm_store_content_update_options:record()
  }).
  -type map_results_to_global_store_test_spec() :: #map_results_to_global_store_test_spec{}.
  
  -record(map_results_to_store_test_spec, {
      global_store_schema_drafts :: [atm_test_schema_factory:atm_store_schema_draft()],
      iterated_item_spec :: atm_data_spec:record(),
      iterated_items :: [automation:item()],
      dst_store_schema_id :: automation:id(),
      dst_store_type :: automation:store_type(),
      dst_store_update_options :: atm_store_content_update_options:record()
  }).
  -type map_results_to_store_test_spec() :: #map_results_to_store_test_spec{}.
  
  
  -define(NOW(), global_clock:timestamp_seconds()).
  
  