anchor.diff:      % Neighb5 = nodelist:mk_neighborhood([N14], N33, 1, 1),
       % remove existing nodes:
       ?compare_neighborhood(nodelist:filter_min_length(Neighb5, fun(N) -> not node:same_process(N, N14) end, 0, 0),
  -                          N33, 33, N33, [N33], N33, [N33], false, false),
  +                          N33, N33, [N33], N33, [N33], false, false),
       ?compare_neighborhood(nodelist:filter_min_length(Neighb5, fun(N) -> not node:same_process(N, N14) end, 1, 1),
  -                          N33, 33, N14, [N14], N14, [N14], true, true),
  +                          N33, N14, [N14], N14, [N14], true, true),
       ?compare_neighborhood(nodelist:filter_min_length(Neighb5, fun(N) -> not node:same_process(N, N14) end, 0, 1),
  -                          N33, 33, N14, [N14], N14, [N14], true, true),
  +                          N33, N14, [N14], N14, [N14], true, true),
       ?compare_neighborhood(nodelist:filter_min_length(Neighb5, fun(N) -> not node:same_process(N, N14) end, 1, 0),
  -                          N33, 33, N14, [N14], N14, [N14], true, true),
  +                          N33, N14, [N14], N14, [N14], true, true),
   
       % remove non-existing nodes and pids:
       ?equals(nodelist:filter_min_length(Neighb5, fun(N) -> not (node:same_process(N, N20) orelse node:same_process(N, N66)) end, 0, 0), Neighb5),
  
positive.code: %% @doc Tests converting neighborhood structures to node lists.
  -spec test_to_list(any()) -> ok.
  test_to_list(_Config) ->
      N8 = node:new(pid1,   8, 0),
      N14 = node:new(pid2, 14, 0),
      N20 = node:new(pid3, 20, 0),
      N33 = node:new(pid4, 33, 0),
      N50 = node:new(pid5, 50, 0),
      
      Neighb1 = nodelist:mk_neighborhood([N8, N14, N33, N50], N20),
      Neighb2 = nodelist:mk_neighborhood([N8, N14, N33, N50], N20, 3, 3),
  
negative.code:     % Neighb2 = nodelist:mk_neighborhood([N8, N14, N42, N50], N33, 3, 3),
      % remove existing nodes:
      ?compare_neighborhood(nodelist:remove(N8, Neighb2),
                            N33, N14, [N14, N50], N42, [N42, N50], true, true),
      ?compare_neighborhood(nodelist:remove(N14, Neighb2),
                            N33, N8, [N8, N50], N42, [N42, N50, N8], true, true),
      ?compare_neighborhood(nodelist:remove(N42, Neighb2),
                            N33, N14, [N14, N8, N50], N50, [N50, N8], true, true),
      ?compare_neighborhood(nodelist:remove(N50, Neighb2),
                            N33, N14, [N14, N8], N42, [N42, N8], true, true),
      % same with the node's pids:
      ?compare_neighborhood(nodelist:remove(pid1, Neighb2),
                            N33, N14, [N14, N50], N42, [N42, N50], true, true),
      ?compare_neighborhood(nodelist:remove(pid2, Neighb2),
                            N33, N8, [N8, N50], N42, [N42, N50, N8], true, true),
      ?compare_neighborhood(nodelist:remove(pid5, Neighb2),
                            N33, N14, [N14, N8, N50], N50, [N50, N8], true, true),
      ?compare_neighborhood(nodelist:remove(pid6, Neighb2),
                            N33, N14, [N14, N8], N42, [N42, N8], true, true),
      % same with an updated node:
      ?compare_neighborhood(nodelist:remove(N9, Neighb2),
                            N33, N14, [N14, N50], N42, [N42, N50], true, true),
  
      % remove non-existing nodes and pids:
      ?equals(nodelist:remove(N20, Neighb2), Neighb2),
  