code: private Observable<DocumentFragment<Lookup>> existsIn(final String id, final LookupSpec spec,
          final long timeout, final TimeUnit timeUnit) {
          return Observable.defer(new Func0<Observable<DocumentFragment<Lookup>>>() {
              @Override
              public Observable<DocumentFragment<Lookup>> call() {
                  final SubExistRequest request = new SubExistRequest(id, spec.path(), bucketName);
                  request.xattr(spec.xattr());
                  request.accessDeleted(accessDeleted);
                  addRequestSpan(environment, request, "subdoc_exists");
                  return applyTimeout(deferAndWatch(new Func1<Subscriber, Observable<SimpleSubdocResponse>>() {
                      @Override
                      public Observable<SimpleSubdocResponse> call(Subscriber s) {
                          request.subscriber(s);
                          return core.send(request);
                      }
                  }).map(new Func1<SimpleSubdocResponse, DocumentFragment<Lookup>>() {
                      @Override
                      public DocumentFragment<Lookup> call(SimpleSubdocResponse response) {
                          try {
                              if (response.content() != null && response.content().refCnt() > 0) {
                                  response.content().release();
                              }
  
                              if (response.status().isSuccess()) {
                                  SubdocOperationResult<Lookup> result = SubdocOperationResult
                                      .createResult(spec.path(), Lookup.EXIST, response.status(), true);
                                  return new DocumentFragment<Lookup>(docId, response.cas(),
                                      response.mutationToken(), Collections.singletonList(result));
                              } else if (response.status() == ResponseStatus.SUBDOC_PATH_NOT_FOUND) {
                                  SubdocOperationResult<Lookup> result = SubdocOperationResult
                                      .createResult(spec.path(), Lookup.EXIST, response.status(), false);
                                  return new DocumentFragment<Lookup>(docId, response.cas(),
                                      response.mutationToken(), Collections.singletonList(result));
                              }
  
                              throw SubdocHelper.commonSubdocErrors(response.status(), id, spec.path());
                          } finally {
                              if (environment.operationTracingEnabled()) {
                                  environment.tracer().scopeManager()
                                      .activate(response.request().span(), true)
                                      .close();
                              }
                          }
                      }
                  }), request, environment, timeout, timeUnit);
              }
          });
      }
docs: Helper method to actually perform the subdoc exists operation.