anchor.diff:          <<"test3.domain.org">>
       ],
   
  -    {ok, Repos} = load_repos(RepoCfg),
  +    {ok, Repos} = process_repos(RepoCfg),
       {value, #{domain := Name, keys := KeyIds}} = lists:search(
           fun(#{domain := D}) -> D =:= <<"test3.domain.org">> end, Repos),
       ?assert(Name =:= <<"test3.domain.org">>),
       ?assert(KeyIds =:= default).
   
  -load_keys_adds_missing_key_definition_test() ->
  +process_keys_adds_missing_key_definition_test() ->
       RepoCfg = [
           #{domain => <<"test1.domain.org">>,
             keys => [#{id => <<"testkey1">>, path => <<"/">>}]},
  
positive.code:           #{executable_path => "/usr/bin/cvmfs_receiver"},
        log_level => <<"info">>}.
  
  
  load(Cfg) ->
      load(Cfg, fun(K) -> load_key(K) end).
  
  
  load(Cfg, KeyLoader) ->
      RepoCfg = maps:get(repos, Cfg, []),
      KeyCfg = maps:get(keys, Cfg, []),
  
negative.code:          load/2]).
  
  
  % Read application configuration (either user_config or repo_config)
  %
  % Read an application configuration variable or return a default value
  % if the variable is undefined. If the variable is set to {file, FileName},
  % FileName will be read using read_config_file, otherwise the contents of
  % the variable itself are returned
  read(VarName, Default) ->
      case application:get_env(VarName) of
          {ok, {file, ConfigFile}} ->
              read_config_file(ConfigFile);
          {ok, ConfigMap} ->
              ConfigMap;
          undefined ->
              Default
      end.
  
  
  