@Override
    public CompletableFuture<StreamObserver<T>> invoke(Object[] arguments) {
        StreamObserver<R> responseObserver = (StreamObserver<R>) arguments[0];
        StreamObserver<T> requestObserver = func.apply(responseObserver);
        return CompletableFuture.completedFuture(requestObserver);
    }
@Test
    void invoke() throws ExecutionException, InterruptedException, TimeoutException {
        StreamObserver<String> responseObserver = Mockito.mock(StreamObserver.class);
        BiStreamMethodHandler<String, String> handler = new BiStreamMethodHandler<>(o -> responseObserver);
        CompletableFuture<StreamObserver<String>> future = handler.invoke(new Object[] {responseObserver});
        Assertions.assertEquals(responseObserver, future.get(1, TimeUnit.SECONDS));
    }