anchor.diff:        {exception, E1, E2}
     end.
   
  -wait_for_nodes_registration(NodesNum, 0) ->
  -  ?assertEqual(NodesNum, check_nodes()),
  -  ok;
  -
  -wait_for_nodes_registration(NodesNum, TriesNum) ->
  -  case check_nodes() of
  -    NodesNum -> ok;
  -    _ ->
  -      timer:sleep(500),
  -      wait_for_nodes_registration(NodesNum, TriesNum - 1)
  -  end.
  -
  +%% check_init/1
  +%% ====================================================================
  +%% @doc Check if cluster is initialized properly.
  +%% @end
  +-spec check_init(ModulesNum :: integer()) -> Ans when
  +  Ans :: boolean() | {exception, E1, E2},
  +  E1 :: term(),
  +  E2 :: term().
  +%% ====================================================================
   check_init(ModulesNum) ->
     try
       {WList, StateNum} = gen_server:call({global, ?CCM}, get_workers, 1000),
  
positive.code:       {exception, E1, E2}
    end.
  
  wait_for_cluster_init() ->
    wait_for_cluster_init(0).
  
  wait_for_cluster_init(ModulesNum) ->
    wait_for_cluster_init(ModulesNum + length(?Modules_With_Args), 20).
  
  wait_for_cluster_init(ModulesNum, 0) ->
  %%   ?assert(check_init(ModulesNum))
    check_init(ModulesNum);
  
negative.code:   end,
    ?assertEqual(ok, Ans).
  
  %% wait_for_nodes_registration/1
  %% ====================================================================
  %% @doc Wait until all nodes will be registered.
  %% @end
  -spec wait_for_nodes_registration(NodesNum :: integer()) -> ok | no_return().
  %% ====================================================================
  wait_for_nodes_registration(NodesNum) ->
    wait_for_nodes_registration(NodesNum, 20).
  
  %% wait_for_nodes_registration/2
  %% ====================================================================
  %% @doc Wait until all nodes will be registered.
  %% @end
  -spec wait_for_nodes_registration(NodesNum :: integer(), TriesNum :: integer()) -> ok | no_return().
  %% ====================================================================
  wait_for_nodes_registration(NodesNum, 0) ->
    ?assertEqual(NodesNum, check_nodes()),
    ok;
  
  wait_for_nodes_registration(NodesNum, TriesNum) ->
    case check_nodes() of
      NodesNum -> ok;
      _ ->
        timer:sleep(500),
        wait_for_nodes_registration(NodesNum, TriesNum - 1)
    end.
  
  %% check_nodes/0
  %% ====================================================================
  %% @doc Get number of registered nodes.
  %% @end
  -spec check_nodes() -> Ans when
    Ans :: integer() | {exception, E1, E2},
    E1 :: term(),
    E2 :: term().
  %% ====================================================================
  check_nodes() ->
    try
      length(gen_server:call({global, ?CCM}, get_nodes, 1000))
  