anchor.diff:                                end),
       ?assertEqual(F, gen_server:call(ns_config, {update_with_changes, F})).
   
  --define(assertConfigEquals(A, B), ?assertEqual(lists:sort(A),
  -                                               lists:sort(B))).
  +-define(assertConfigEquals(A, B), ?assertEqual(lists:sort([{K, strip_metadata(V)} || {K,V} <- A]),
  +                                               lists:sort([{K, strip_metadata(V)} || {K,V} <- B]))).
   
   test_set() ->
       Self = self(),
  
positive.code: 
      ?assertEqual([[{a, b}, {c, d}], {a, b}, {c, d}], ListValues),
  
      ?assertEqual(-3, proplists:get_value(a, NewConfig)),
      ?assertEqual(-4, proplists:get_value(b, NewConfig)),
  
      ns_config:update_key(a, fun (3) -> 10 end),
      Updater2 = RecvUpdater(),
      {[{a, 10}], NewConfig2} = Updater2(OldConfig),
  
      ?assertConfigEquals([{a, 10} | lists:keydelete(a, 1, OldConfig)], NewConfig2),
      ok.
  
negative.code: strip_metadata(Value) ->
      Value.
  
  extract_vclock([{'_vclock', Clock} | _]) -> Clock;
  extract_vclock(_Value) -> [].
  
  %% Increment the vclock in V2 and replace the one in V1
  increment_vclock(NewValue, OldValue) ->
      OldVClock = extract_vclock(OldValue),
      NewVClock = lists:sort(vclock:increment(node(), OldVClock)),
      [{?METADATA_VCLOCK, NewVClock} | strip_metadata(NewValue)].
  
  %% Set the vclock in NewValue to one that descends from both
  merge_vclocks(NewValue, OldValue) ->
      NewValueVClock = extract_vclock(NewValue),
      OldValueVClock = extract_vclock(OldValue),
      case NewValueVClock =:= [] andalso OldValueVClock =:= [] of
          true ->
              NewValue;
          _ ->
              NewVClock = lists:sort(vclock:merge([OldValueVClock, NewValueVClock])),
              [{?METADATA_VCLOCK, NewVClock} | strip_metadata(NewValue)]
      end.
  
  %% gen_server callbacks
  
  