![image](https://user-images.githubusercontent.com/42512469/190078802-e1818b47-5905-4452-86cf-25ce70b4174f.png)


![image](https://user-images.githubusercontent.com/42512469/190079027-44af1591-cc7b-4149-ba93-ffbbef238038.png)

CompletableFuture.completedFuture(new AppResponse(requestObserver)), invocation);
        return result;
    }
    StreamObserver<Object> streamCall(ClientCall call,
        RequestMetadata metadata,
        StreamObserver<Object> responseObserver) {
        if (responseObserver instanceof CancelableStreamObserver) {
            final CancellationContext context = new CancellationContext();
            ((CancelableStreamObserver<Object>) responseObserver).setCancellationContext(context);
            context.addListener(context1 -> call.cancelByLocal(new IllegalStateException("Canceled by app")));
        }
        ObserverToClientCallListenerAdapter listener = new ObserverToClientCallListenerAdapter(
            responseObserver);
        return call.start(metadata, listener);
    }
    AsyncRpcResult invokeUnary(MethodDescriptor methodDescriptor, Invocation invocation,
        ClientCall call) {
        ExecutorService callbackExecutor = getCallbackExecutor(getUrl(), invocation);
        int timeout = calculateTimeout(invocation, invocation.getMethodName());
        invocation.setAttachment(TIMEOUT_KEY, timeout);
        final AsyncRpcResult result;
        DeadlineFuture future = DeadlineFuture.newFuture(getUrl().getPath(),
            methodDescriptor.getMethodName(), getUrl().getAddress(), timeout, callbackExecutor);
        RequestMetadata request = createRequest(methodDescriptor, invocation, timeout);
        final Object pureArgument;
        if (methodDescriptor.getParameterClasses().length == 2
            && methodDescriptor.getParameterClasses()[1].isAssignableFrom(
            StreamObserver.class)) {
            StreamObserver<Object> observer = (StreamObserver<Object>) invocation.getArguments()[1];
            future.whenComplete((r, t) -> {