anchor.diff:        %lager:debug("get_delegations, failed to get zone for ~p: ~p", [Name, Response]),
         {reply, Response, State}
     end;
  -
  -handle_call({get_authority, Name}, _From, State) ->
  -  find_authority(normalize_name(Name), State);
   
   handle_call({get_records_by_name, Name}, _From, State) ->
     case find_zone_in_cache(Name, State) of
  
positive.code:     [] -> {error, zone_not_found};
      [_] -> {error, zone_not_found};
      [_|Labels] ->
        case get_zone(Name) of
          {ok, Zone} -> Zone;
          {error, zone_not_found} ->
            case Name =:= Authority#dns_rr.name of
  
negative.code:     _ -> {reply, {error, zone_not_found}, State}
    end;
  
  %% @doc Get authority records (SOA) for a zone.
  handle_call({get_authority, Name}, _From, State) ->
    find_authority(normalize_name(Name), State);
  
  %% @doc Get delegation records (NS and associated glue records) for a zone.
  handle_call({get_delegations, Name}, _From, State) ->
    case find_zone_in_cache(Name, State) of
      {ok, Zone} ->
  