anchor.diff:            ?assert(meck:validate(autocluster_httpc))
           end},
         {"with token", fun() ->
  -        meck:expect(autocluster_httpc, get,
  -          fun(Scheme, Host, Port, Path, Args) ->
  +        meck:expect(autocluster_httpc, put,
  +          fun(Scheme, Host, Port, Path, Args, Body) ->
               ?assertEqual("http", Scheme),
               ?assertEqual("consul.service.consul", Host),
               ?assertEqual(8500, Port),
               ?assertEqual([v1, agent, check, pass, "service:rabbitmq"], Path),
               ?assertEqual([{token, "token-value"}], Args),
  +            ?assertEqual("", Body),
               {ok, []}
             end),
           os:putenv("CONSUL_HOST", "consul.service.consul"),
  
positive.code:         end},
        {"without token",
          fun() ->
            meck:expect(autocluster_httpc, get,
              fun(Scheme, Host, Port, Path, Args) ->
                ?assertEqual("https", Scheme),
                ?assertEqual("consul.service.consul", Host),
                ?assertEqual(8501, Port),
                ?assertEqual([v1, agent, check, pass, "service:rabbit"], Path),
                ?assertEqual([], Args),
                {ok, []}
              end),
            os:putenv("CONSUL_SCHEME", "https"),
  
negative.code:         ?assert(meck:validate(autocluster_httpc))
         end},
        {"on error", fun() ->
          meck:expect(autocluster_httpc, put,
            fun(_Scheme, _Host, _Port, _Path, _Args, _Body) ->
              {error, "testing"}
            end),
          ?assertEqual({error, "testing"}, autocluster_consul:unregister()),
  