docs: @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1789")
    public static <T extends AbstractStub<T>> T captureMetadata(
        T stub,
        AtomicReference<Metadata> headersCapture,
        AtomicReference<Metadata> trailersCapture) {
      return stub.withInterceptors(
          newCaptureMetadataInterceptor(headersCapture, trailersCapture));
    }