anchor.diff:      % Neighb2 = nodelist:mk_neighborhood([N8, N14, N42, N50], N33, 3, 3),
       % remove existing nodes:
       ?compare_neighborhood(nodelist:filter_min_length(Neighb2, fun(N) -> not (node:same_process(N, N8) orelse node:same_process(N, N50)) end, 0, 0),
  -                          N33, 33, N14, [N14], N42, [N42], true, true),
  +                          N33, N14, [N14], N42, [N42], true, true),
       ?compare_neighborhood(nodelist:filter_min_length(Neighb2, fun(N) -> not (node:same_process(N, N8) orelse node:same_process(N, N50)) end, 1, 1),
  -                          N33, 33, N14, [N14], N42, [N42], true, true),
  +                          N33, N14, [N14], N42, [N42], true, true),
       ?compare_neighborhood(nodelist:filter_min_length(Neighb2, fun(N) -> not (node:same_process(N, N8) orelse node:same_process(N, N50)) end, 2, 2),
  -                          N33, 33, N14, [N14, N8], N42, [N42, N50], true, true),
  +                          N33, N14, [N14, N8], N42, [N42, N50], true, true),
       ?compare_neighborhood(nodelist:filter_min_length(Neighb2, fun(N) -> not (node:same_process(N, N8) orelse node:same_process(N, N50)) end, 3, 3),
  -                          N33, 33, N14, [N14, N8, N50], N42, [N42, N50, N8], true, true),
  +                          N33, N14, [N14, N8, N50], N42, [N42, N50, N8], true, true),
       ?compare_neighborhood(nodelist:filter_min_length(Neighb2, fun(N) -> not (node:same_process(N, N8) orelse node:same_process(N, N50)) end, 4, 4),
  -                          N33, 33, N14, [N14, N8, N50], N42, [N42, N50, N8], true, true),
  +                          N33, N14, [N14, N8, N50], N42, [N42, N50, N8], true, true),
       ?compare_neighborhood(nodelist:filter_min_length(Neighb2, fun(N) -> not (node:same_process(N, N8) orelse node:same_process(N, N50)) end, 2, 4),
  -                          N33, 33, N14, [N14, N8], N42, [N42, N50, N8], true, true),
  +                          N33, N14, [N14, N8], N42, [N42, N50, N8], true, true),
       ?compare_neighborhood(nodelist:filter_min_length(Neighb2, fun(N) -> not (node:same_process(N, N8) orelse node:same_process(N, N50)) end, 4, 2),
  -                          N33, 33, N14, [N14, N8, N50], N42, [N42, N50], true, true),
  +                          N33, N14, [N14, N8, N50], N42, [N42, N50], true, true),
   
       % remove non-existing nodes and pids:
       ?equals(nodelist:filter_min_length(Neighb2, fun(N) -> not (node:same_process(N, N20) orelse node:same_process(N, N66)) end, 0, 0), Neighb2),
  
positive.code: 
  % TODO: add tests for simple node lists (the following tests only test functions with neighborhood structures)
  
  % use macro instead of function so that the output in case of errors is better:
  -define(compare_neighborhood(Neighborhood, Node, NodeId, Pred, Preds, Succ, Succs, RealPred, RealSucc),
          compare_neighborhood(??Neighborhood, Neighborhood, Node, NodeId, Pred, Preds, Succ, Succs, RealPred, RealSucc)).
  
  -spec compare_neighborhood(NeighborhoodStr::string(), N::nodelist:neighborhood(), Node::node:node_type(), NodeId::?RT:key(), Pred::node:node_type(), Preds::nodelist:snodelist(), Succ::node:node_type(), Succs::nodelist:snodelist(), RealPred::boolean(), RealSucc::boolean()) -> ok.
  compare_neighborhood(NeighborhoodStr, N, Node, NodeId, Pred, Preds, Succ, Succs, RealPred, RealSucc) ->
      ?equals_w_note(nodelist:node(N), Node, io_lib:format("N = ~s", [NeighborhoodStr])),
      ?equals_w_note(nodelist:nodeid(N), NodeId, io_lib:format("N = ~s", [NeighborhoodStr])),
      ?equals_w_note(nodelist:pred(N), Pred, io_lib:format("N = ~s", [NeighborhoodStr])),
      ?equals_w_note(nodelist:preds(N), Preds, io_lib:format("N = ~s", [NeighborhoodStr])),
      ?equals_w_note(nodelist:succ(N), Succ, io_lib:format("N = ~s", [NeighborhoodStr])),
  
negative.code:     end.
  
  tester_largest_smaller_than3(_Config) ->
      % some tests that previously failed:
      prop_largest_smaller_than3_fixed_types(
        {node, proc1, ?KEY(5), 5, 8000},
        [{node, proc2, ?KEY(0), 2, 8000}, {node, proc3, ?KEY(3), 2, 8000}],
        1, 3, ?KEY(5), {node, proc2, ?KEY(0), 2, 8000}),
      
      prop_largest_smaller_than3_fixed_types(
          {node, proc1, ?KEY(2), 1, 8000},
          [{node, proc2, ?KEY(5), 0, 8000}, {node, proc3, ?KEY(4), 4, 8000}],
          2, 5, ?KEY(3), {node, proc4, ?KEY(5), 0, 8000}),
      
      prop_largest_smaller_than3_fixed_types(
        {node, proc1, ?KEY(2), 1, 8000},
        [{node, proc2, ?KEY(5), 0, 8000}, {node, proc3, ?KEY(3), 1, 8000}],
        1, 1, ?KEY(2), {node, proc3, ?KEY(3), 1, 8000}),
      
      tester:test(?MODULE, prop_largest_smaller_than3, 5, 5000, [{threads, 2}]).
  
  test_succ_ord_id(_Config) ->
      ?assert(nodelist:succ_ord_id(?KEY(5), ?KEY(6), ?KEY(3))),
      ?assert(nodelist:succ_ord_id(?KEY(6), ?KEY(5), ?KEY(3)) =:= false),
      ?assert(nodelist:succ_ord_id(?KEY(5), ?KEY(6), ?KEY(7))),
      ?assert(nodelist:succ_ord_id(?KEY(6), ?KEY(5), ?KEY(7)) =:= false),
  
      ?assert(nodelist:succ_ord_id(?KEY(5), ?KEY(5), ?KEY(5))),
      ?assert(nodelist:succ_ord_id(?KEY(5), ?KEY(5), ?KEY(6))),
      ?assert(nodelist:succ_ord_id(?KEY(5), ?KEY(5), ?KEY(4))),
  
      ?assert(nodelist:succ_ord_id(?RT:n(), ?KEY(4), ?KEY(5))),
      ?assert(nodelist:succ_ord_id(?RT:n(), ?MINUS_INFINITY, ?KEY(5))),
      ?assert(nodelist:succ_ord_id(?KEY(4), ?RT:n(), ?KEY(5)) =:= false),
      ?assert(nodelist:succ_ord_id(?MINUS_INFINITY, ?RT:n(), ?KEY(5)) =:= false),
  
      ?assert(nodelist:succ_ord_id(?KEY(4), ?KEY(8), ?KEY(4))),
      ?assert(nodelist:succ_ord_id(?KEY(8), ?KEY(4), ?KEY(4)) =:= false).
  