anchor.diff:                  _:_ -> ok % will be checked and rerun
               end,
               check_and_unload_mock(Module, Num - 1)
  +    end.
  +
  +%%--------------------------------------------------------------------
  +%% @private
  +%% @doc
  +%% Executes function with retries (fun should end with ok).
  +%% @end
  +%%--------------------------------------------------------------------
  +-spec do_action(Fun :: fun(() -> ok)) -> ok | no_return().
  +do_action(Fun) ->
  +    do_action(Fun, 10).
  +
  +%%--------------------------------------------------------------------
  +%% @private
  +%% @doc
  +%% Executes function with retries (fun should end with ok).
  +%% @end
  +%%--------------------------------------------------------------------
  +-spec do_action(Fun :: fun(() -> ok), Num :: integer()) -> ok | no_return().
  +do_action(Fun, 0) ->
  +    ?assertMatch(ok, Fun());
  +do_action(Fun, Num) ->
  +    try
  +        case Fun() of
  +            ok ->
  +                ok;
  +            Other ->
  +                ct:print("Action ~p failed with ans: ~p", [Fun, Other]),
  +                do_action(Fun, Num - 1)
  +        end
  +    catch
  +        E1:E2 ->
  +            ct:print("Action ~p failed with error: ~p", [Fun, {E1, E2}]),
  +            do_action(Fun, Num - 1)
       end.
positive.code: -spec mock_unload(Nodes :: node() | [node()]) -> ok.
  mock_unload(Nodes) ->
      lists:foreach(fun(Node) ->
          case rpc:call(Node, meck, unload, [], ?TIMEOUT) of
              Unloaded when is_list(Unloaded) -> ok;
              {badrpc, {'EXIT', {{not_mocked, _}, _}}} ->
                  ok
          end
      end, as_list(Nodes)).
  
  %%--------------------------------------------------------------------
  
negative.code:     Modules :: module() | [module()]) -> ok.
  mock_validate(Nodes, Modules) ->
      lists:foreach(fun(Node) ->
          do_action(fun() ->
              case rpc:call(Node, meck, validate, [as_list(Modules)], ?TIMEOUT) of
                  true ->
                      ok;
                  Other ->
                      Other
              end
          end)
      end, as_list(Nodes)).
  
  
  