anchor.diff:  %% @hidden
   -spec handle_call(X::term(), reference(), state()) -> {reply, {Failed::apns:msg(), RestToRetry::[apns:msg()]}, state()}.
   handle_call({fail, ID}, _From, #state{queue=Queue}=State) ->
  -    {reply, recover_fail(ID, Queue), State#state{queue=?QUEUE:new()}};
  +    {reply, recover_fail(ID, Queue), State#state{queue=queue:new()}};
   
   handle_call(_Msg, _From, State) ->
       {reply, ok, State}.
  
positive.code: 
  -behaviour(gen_server).
  
  -define(QUEUE, queue).
  -define(DEFAULT_MAX_ENTRIES, 1000).
  
  -export([
  
negative.code:     {stop, normal, State};
  
  handle_cast({in, Msg}, #state{max_entries=MaxEntries,queue=OldQueue}=State) ->
      Queue = case MaxEntries =< queue:len(OldQueue) of
          true -> queue:liat(OldQueue);
          false -> OldQueue
      end,
      {noreply, State#state{queue = queue:in(Msg, Queue)}};
  
  handle_cast(_Msg, State) ->
      {noreply, State}.
  