anchor.diff:  -record(state, { up_nodes = [],
                    services = [],
                    service_pids = [],
  +                 service_healths = [],
                    peers = []}).
   
   -define(QC_OUT(P),
  
positive.code:     gen_server:cast(riak_core_node_watcher, {ring_update, Ring}),
      wait_for_avsn(Avsn0),
      ?ORDSET(Nodes).
  
  
  %% ====================================================================
  
negative.code: next_state(S, _Res, {call, _, wait_for_bcast, _}) ->
      S;
  
  next_state(S, _, {call, _, healthy_new_service, [_Service]}) ->
      meck:expect(mod_health, callback, fun (Pid, true) when is_pid(Pid) ->
          true
      end),
      S;
  
  next_state(S, Res, {call, M, healthy_existing_service, [Service]}) ->
      meck:expect(mod_health, callback, fun (Pid, true) when is_pid(Pid) ->
          true
      end),
      next_state(S, Res, {call, M, local_service_up, [Service]});
  
  next_state(S, Res, {call, M, unhealthy_service, [Service]}) ->
      meck:expect(mod_health, callback, fun (Pid, false) when is_pid(Pid) ->
          false
      end),
      next_state(S, Res, {call, M, local_service_up, [Service]});
  
  next_state(S, Res, {call, M, recovering_service, [Service]}) ->
      meck:sequence(mod_health, callback, 2, [false, true]),
      next_state(S, Res, {call, M, local_service_up, [Service]});
  
  next_state(S, Res, {call, M, faulty_health_check_callback_once, [Service]}) ->
      meck:expect(mod_health, callback, fun(_Pid, error_once) ->
          case put(meck_boomed, true) of
              false ->
                  meck:exception(meck_boomed);
              true ->
                  true
          end
      end),
      next_state(S, Res, {call, M, local_service_up, [Service]});
  
  next_state(S, Res, {call, M, faulty_health_check_callback_many, [Service]}) ->
      meck:expect(mod_health, callback, fun(_Pid, error) ->
          meck:exception(meck_boomed)
      end),
      next_state(S, Res, {call, M, local_service_up, [Service]});
  
  next_state(S, _Res, {call, _, ring_update, [Nodes]}) ->
      Peers = ordsets:del_element(node(), ordsets:from_list(Nodes)),
      peer_filter(S#state { peers = Peers }).
  
  
  
  
  