anchor.diff:      case ns_config:search_node(node(), Config, config_version) of
           {value, CurrentVersion} ->
               [];
  -        {value, {3,0}} ->
  -            [{set, {node, node(), config_version}, {3,0,2}} |
  -             upgrade_config_from_3_0_to_3_0_2(Config)];
  -        {value, {3,0,2}} ->
  -            [{set, {node, node(), config_version}, {3,1,5}} |
  -             upgrade_config_from_3_0_2_to_3_1_5(Config)];
  -        {value, {3,1,5}} ->
  -            [{set, {node, node(), config_version}, {4,0}} |
  -             upgrade_config_from_3_1_5_to_4_0(Config)];
           {value, {4,0}} ->
               [{set, {node, node(), config_version}, {4,1,1}} |
                upgrade_config_from_4_0_to_4_1_1(Config)];
  
positive.code:                                 continue
                          end, Config).
  
  upgrade_3_0_to_3_0_2_test() ->
      Cfg = [[{some_key, some_value},
              {{node, node(), memcached},
               [{engines, old_value},
                {ssl_port, 1},
                {verbosity, 2},
                {port, 3}]},
              {{node, node(), memcached_config}, memcached_config}]],
      Default = [{{node, node(), port_servers}, port_servers_cfg},
                 {{node, node(), memcached}, [{ssl_port, 1}, {verbosity, 3},
                                              {engines, [something]}]},
                 {{node, node(), memcached_config}, memcached_config}],
  
      ?assertMatch([{set, {node, _, memcached}, [{engines, [something]},
                                                 {ssl_port, 1}, {verbosity, 2},
                                                 {port, 3}]},
                    {set, {node, _, memcached_config}, memcached_config}],
                   do_upgrade_config_from_3_0_to_3_0_2(Cfg, Default)).
  
  upgrade_3_0_2_to_3_1_5_test() ->
      Cfg = [[{some_key, some_value},
              {{node, node(), memcached},
               [{some_key, some_value}]},
              {{node, node(), port_servers}, old_port_servers},
              {{node, node(), memcached_config},
               {[{some_key, some_value}]}}
             ]],
      Default = [{{node, node(), memcached_defaults},
                  [{some, stuff}]},
                 {{node, node(), port_servers}, new_port_servers},
                 {{node, node(), memcached},
                  [{audit_file, audit_file_path}]},
                 {{node, node(), memcached_config},
                  {[{some_other_key, some_value},
                    {dedupe_nmvb_maps, dedupe_nmvb_maps}]}}],
      ?assertMatch([{set, {node, _, memcached_defaults}, [{some, stuff}]},
                    {set, {node, _, memcached_config},
                     {[{some_key, some_value},
                       {dedupe_nmvb_maps, dedupe_nmvb_maps}]}}],
                   do_upgrade_config_from_3_0_2_to_3_1_5(Cfg, Default)).
  
  upgrade_3_1_5_to_4_0_test() ->
      Cfg = [[{some_key, some_value},
              {{node, node(), memcached},
               [{engines, old_value},
                {ssl_port, 1},
                {verbosity, 2},
                {port, 3}]},
              {{node, node(), memcached_config}, old_memcached_config},
              {{node, node(), port_servers}, old_port_servers}]],
      Default = [{{node, node(), memcached_defaults},
                  [{some, stuff}]},
                 {{node, node(), port_servers}, new_port_servers},
                 {{node, node(), memcached}, [{ssl_port, 1},
                                              {config_path, cfg_path},
                                              {engines, [something]},
                                              {audit_file, audit_file_path}]},
                 {{node, node(), memcached_config}, new_memcached_config}],
  
      ?assertMatch([{set, {node, _, memcached_defaults}, [{some, stuff}]},
                    {set, {node, _, port_servers}, new_port_servers},
                    {set, {node, _, memcached}, [{engines, [something]},
                                                 {ssl_port, 1},
                                                 {port, 3},
                                                 {audit_file, audit_file_path},
                                                 {config_path, cfg_path}]},
                    {set, {node, _, memcached_config}, new_memcached_config}],
                   do_upgrade_config_from_3_1_5_to_4_0(Cfg, Default)).
  
  upgrade_4_0_to_4_1_1_test() ->
      Cfg = [[{some_key, some_value},
              {{node, node(), memcached}, old_memcached_config},
  
negative.code:               lists:keystore(SubKey, 1, Acc, Val)
        end, Props, SubKeys).
  
  upgrade_config_from_4_0_to_4_1_1(Config) ->
      ?log_info("Upgrading config from 4.0 to 4.1.1"),
      do_upgrade_config_from_4_0_to_4_1_1(Config, default()).
  