anchor.diff:                   ?assertEqual({error,<<"{'query',{\"Query takes a list of step tuples\",undefined}}">>},
                                 Res)
                end)}
  -
        ].
   
   -endif.
  
positive.code: %% ====================================================================
  
  maybe_reply({reply, Reply, State}) ->
      send_caller(Reply, State);
  maybe_reply({noreply, State}) ->
      State.
  
  %% @private
  %% Reply to caller - form clause first in case a ReqId/Client was passed
  %% in as the context and gen_server:reply hasn't been called yet.
  send_caller(Msg, State=#state{pending = #request{ctx = {ReqId, Client}, 
                                                   from = undefined}}) ->
      Client ! {ReqId, Msg},
      State;
  send_caller(Msg, State=#state{pending=#request{from = From}=Pending}) when From /= undefined ->
      gen_server:reply(From, Msg),
      State#state{pending = Pending#request{from = undefined}}.
  
  default_timeout(_Op) ->
      60000.
  
negative.code: -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
           terminate/2, code_change/3]).
  
  -record(state, {address, port, sock, pending, queue}).
  -record(request, {ref :: reference(), msg :: rpb_req(), from, ctx :: ctx(), timeout :: integer(),
                    tref :: reference() | undefined }).
  
  -define(PROTO_MAJOR, 1).
  -define(PROTO_MINOR, 0).
  