public static <T, R> void serverStreamCall(
            Invoker<?> invoker, MethodDescriptor method, T request, StreamObserver<R> responseObserver) {
        call(invoker, method, new Object[] {request, responseObserver});
    }
@Test
    void serverStreamCall() throws InterruptedException {
        when(invoker.invoke(any(Invocation.class))).then(invocationOnMock -> {
            Invocation invocation = (Invocation) invocationOnMock.getArguments()[0];
            StreamObserver<Object> observer =
                    (StreamObserver<Object>) invocation.getArguments()[1];
            for (int i = 0; i < 10; i++) {
                observer.onNext(response);
            }
            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();
            }
        };
        StubInvocationUtil.serverStreamCall(invoker, method, request, responseObserver);
        Assertions.assertTrue(latch.await(1, TimeUnit.SECONDS));
    }