anchor.diff:                             {Cap, ResolvedAcc and Resv}
                      end, true, Registered).
   
  -query_capability(Node, Known, Capability, DefaultSup, LegacyVar) ->
  +query_capability(Node, RPCFn, Known, Capability, DefaultSup, LegacyVar) ->
       case dict:find(Capability, Known) of
           {ok, Supported} ->
               {true, {Capability, Supported}};
           error ->
  -            query_capability(Node, Capability, DefaultSup, LegacyVar)
  -    end.
  -
  -query_capability(_, Capability, DefaultSup, undefined) ->
  +            query_capability(Node, RPCFn, Capability, DefaultSup, LegacyVar)
  +    end.
  +
  +query_capability(_, _, Capability, DefaultSup, undefined) ->
       Default = {Capability, [DefaultSup]},
       {true, Default};
  -query_capability(Node, Capability, DefaultSup, {App, Var, Map}) ->
  +query_capability(Node, RPCFn, Capability, DefaultSup, {App, Var, Map}) ->
       Default = {Capability, [DefaultSup]},
  -    Result = riak_core_util:safe_rpc(Node, application, get_env, [App, Var]),
  +    Result = RPCFn(Node,App, Var),
       case Result of
           {badrpc, _} ->
               {false, Default};
  
positive.code:     case application:get_env(riak_core, registered_capabilities) of
          undefined -> [];
          {ok, Caps} -> Caps
      end.
negative.code:          end
       end || Member <- Members].
  
  
  %% Determine capabilities of legacy nodes based on app.config settings and
  %% the provided app-var -> mode mapping associated with capabilities when
  %% registered.
  query_capabilities(Node, State=#state{ rpc_fn = RPCFn, registered=Registered}) ->
      %% Only query results we do not already have local knowledge of
      Known = dict:from_list(get_supported(Node, State)),
      lists:mapfoldl(fun({Capability, Info}, ResolvedAcc) ->
                             {Resv, Cap} = query_capability(Node,
                                                            RPCFn,
                                                            Known,
                                                            Capability,
                                                            Info#capability.default,
  