anchor.diff:                         ?assertEqual(ok, ?TEST_MODULE:resume()),
                          ?assertEqual(ok, ?TEST_MODULE:suspend()),
                          ?show_miner_state(),
  -                       aec_test_utils:wait_for_it(
  -                         fun() ->
  -                                 {State, _} = sys:get_state(?TEST_MODULE),
  -                                 State
  -                         end, idle)
  +                       wait_for_idle()
                          %% ?show_miner_state(),
   
                          %% ?assertEqual(ok, ?TEST_MODULE:suspend())
  
positive.code:                {"Run miner for a while",
                  fun() ->
                          ?assertEqual(ok, ?TEST_MODULE:suspend()),
                          aec_test_utils:wait_for_it(
                            fun() ->
                                    {State, _} = sys:get_state(?TEST_MODULE),
                                    (State =:= idle)
                            end, true),
                         
                          meck:new(aec_chain, [passthrough]),
                          TestPid = self(),
                          meck:expect(
  
negative.code:       end
       ]}.
  
  wait_for_idle() ->
      aec_test_utils:wait_for_it(
        fun() ->
                {State, _} = sys:get_state(?TEST_MODULE),
                State
        end, idle).
  
  wait_for_running() ->
      aec_test_utils:wait_for_it(
        fun() ->
  