anchor.diff:          end
         , fun () ->
                   meck:expect(wrq, path_info, 2, "23"),
  -                {false, _, _} =
  +                {false, _, State} =
                       malformed_request(req, #state{ mode = document
                                                    , path_info = id
                                                    }
                                        ),
  +                23 = State#state.document_id,
                   ok
           end
         ]
  
positive.code:     Id =
          case PathInfo of
              id ->
                  integer_path_info(id, Req);
              path ->
                  {ok, Result} = path_to_id(wrq:path_info(path, Req), Context),
                  Result
  
negative.code:     {true, Req, State};
  resource_exists(Req, State = #state{mode = document, path_info = id}) ->
      Context = State#state.context,
      {m_rsc:exists(State#state.document_id, Context), Req, State};
  resource_exists(Req, State = #state{mode = document, path_info = path}) ->
      Context = State#state.context,
      case path_to_id(wrq:path_info(path, Req), Context) of
  