anchor.diff:  
   %@private
   
  +-spec(on/2 :: (any(), null) -> null).
   on({register_process, InstanceId, Name, Pid}, State) ->
  -    %io:format("insert: ~p ~n",[{{InstanceId, Name}, Pid}]),
  -    ets:insert(?MODULE, {{InstanceId, Name}, Pid}),
  +    case ets:insert_new(?MODULE, {{InstanceId, Name}, Pid}) of
  +        true ->
  +            link(Pid);
  +        false ->
  +            OldPid = ets:lookup_element(?MODULE, {InstanceId, Name}, 2),
  +            unlink(OldPid),
  +            link(Pid),
  +            ets:insert_new(?MODULE, {{InstanceId, Name}, Pid})
  +    end,
       cs_send:send_local(Pid , {ok}),
  -    {State};
  +    State;
   on({drop_state}, State) ->
  +    % only for unit tests
  +    Links = ets:match(?MODULE, {'_', '$1'}),
  +    [unlink(Pid) || [Pid] <- Links],
       ets:delete_all_objects(?MODULE),
  -    {State};
  -
  +    State;
  +on({'EXIT', FromPid, _Reason}, State) ->
  +    Processes = ets:match(?MODULE, {'$1', FromPid}),
  +    [ets:delete(?MODULE, {InstanceId, Name}) || [{InstanceId, Name}] <- Processes],
  +    State;
   on(_, _State) ->
       unknown_event.
   
  
positive.code:              failed
           end.
  
  
  
  
  
  find_all_groups([], Set) ->
      Set;
  find_all_groups([{{InstanceId, _}, _} | Rest], Set) ->
  
negative.code: start_link() ->
      io:format("Start PD~n"),
      gen_component:start_link(?MODULE, [], [{register_native, process_dictionary}]).
  
  %@doc Starts the server for unit testing
  start_link_for_unittest() ->
      case whereis(process_dictionary) of
          undefined ->
              gen_component:start_link(?MODULE, [], [{register_native, process_dictionary}]);
          _ ->
              cs_send:send_local(get_pid() , {drop_state}),
              already_running
      end.
  
  %%--------------------------------------------------------------------
  %% Function: start() -> {ok,Pid} | ignore | {error,Error}
  %% Description: Starts the server; for use with the test framework
  %%--------------------------------------------------------------------
  %@doc Starts the server; for use with the test framework
  start() ->
      gen_component:start_link(?MODULE, [], [{register_native, process_dictionary}]).
  
  
  