anchor.diff:      ].
   
   merge_metric_dir_test_() ->
  -    EmptyDir = #metric_dir{name=[], metrics=orddict:new(), dirs=orddict:new()},
  +    EmptyDir = ?EMPTY_METRIC_DIR,
       Metric = #metric_file{name= <<"test">>},
       Exp1 = #metric_dir{name= <<"bar">>, dirs=[], metrics=orddict:from_list([{<<"test">>, Metric}])},
       Exp2 = #metric_dir{name= <<"foo">>, dirs=orddict:from_list([{<<"bar">>, Exp1}]), metrics=[]},
  
positive.code: 
  convert_to_remote(Node, #metric_file{handler={local, Pid}}=MF, Ms) ->
      Handler = {remote, node(), Pid},
      V0 = MF#metric_file{handler=Handler},
      orddict:store(Node, V0, Ms);
  
  convert_to_remote(_Node, _MetricFile, Metrics) ->
      Metrics.
  
negative.code:     Ms0 = orddict:fold(fun convert_to_remote/3, orddict:new(), Metrics),
      Ds0 = orddict:fold(fun(K, V, Ds) ->
                                 V0 = prepare_metrics_for_remote(V),
                                 NoMetrics = orddict:is_empty(V0#metric_dir.metrics),
                                 NoDirs = orddict:is_empty(V0#metric_dir.dirs),
  
                                 % remove empty metric entries
                                 case NoMetrics andalso NoDirs of
                                     false -> orddict:store(K, V0, Ds);
                                     true -> Ds
                                 end
  