public static <T, R> StreamObserver<T> biOrClientStreamCall(
            Invoker<?> invoker, MethodDescriptor method, StreamObserver<R> responseObserver) {
        return (StreamObserver<T>) call(invoker, method, new Object[] {responseObserver});
    }
@Test
    void biOrClientStreamCall() throws InterruptedException {
        when(invoker.invoke(any(Invocation.class))).then(invocationOnMock -> {
            Invocation invocation = (Invocation) invocationOnMock.getArguments()[0];
            StreamObserver<Object> observer =
                    (StreamObserver<Object>) invocation.getArguments()[0];
            observer.onNext(response);
            observer.onCompleted();
            when(result.recreate()).then(invocationOnMock1 -> new StreamObserver<Object>() {
                @Override
                public void onNext(Object data) {
                    observer.onNext(data);
                }

                @Override
                public void onError(Throwable throwable) {}

                @Override
                public void onCompleted() {
                    observer.onCompleted();
                }
            });
            return result;
        });
        CountDownLatch latch = new CountDownLatch(11);
        StreamObserver<Object> responseObserver = new StreamObserver<Object>() {
            @Override
            public void onNext(Object data) {
                latch.countDown();
            }

            @Override
            public void onError(Throwable throwable) {}

            @Override
            public void onCompleted() {
                latch.countDown();
            }
        };
        StreamObserver<Object> observer = StubInvocationUtil.biOrClientStreamCall(invoker, method, responseObserver);
        for (int i = 0; i < 10; i++) {
            observer.onNext(request);
        }
        observer.onCompleted();
        Assertions.assertTrue(latch.await(1, TimeUnit.SECONDS));
    }