@Override
    public StreamObserver<StreamingOutputCallRequest> halfDuplexCall(
            final StreamObserver<StreamingOutputCallResponse> responseObserver) {
        final Queue<Chunk> chunks = new LinkedList<Chunk>();
        return new StreamObserver<StreamingOutputCallRequest>() {
            @Override
            public void onNext(StreamingOutputCallRequest request) {
                chunks.addAll(toChunkQueue(request));
            }

            @Override
            public void onCompleted() {
                // Dispatch all of the chunks in one shot.
                new ResponseDispatcher(responseObserver).enqueue(chunks).completeInput();
            }

            @Override
            public void onError(Throwable cause) {
                responseObserver.onError(cause);
            }
        };
    }
Similar to {@link #fullDuplexCall}, except that it waits for all streaming requests to be
received before starting the streaming responses.
grpc/src/test/java/com/linecorp/armeria/internal/common/grpc/TestServiceImpl.java