@Test
    void deadlineInFuture() throws Exception {
        final TestServiceGrpc.TestServiceStub stub =
                asyncStub.withDeadlineAfter(500, TimeUnit.MILLISECONDS);
        final StreamRecorder<StreamingOutputCallResponse> responseObserver = StreamRecorder.create();
        stub.streamingOutputCall(
                StreamingOutputCallRequest
                        .newBuilder()
                        .addResponseParameters(
                                ResponseParameters.newBuilder()
                                                  .setIntervalUs((int) TimeUnit.SECONDS.toMicros(1))
                                                  .build())
                        .build(),
                responseObserver);
        responseObserver.awaitCompletion(operationTimeoutMillis(), TimeUnit.MILLISECONDS);

        await().untilAsserted(() -> assertThat(CLIENT_HEADERS_CAPTURE.get()).isNotNull());

        final String grpcTimeout = CLIENT_HEADERS_CAPTURE.get().get(GrpcHeaderNames.GRPC_TIMEOUT);
        // grpc-timeout header value is computed when the request has started processing and will be lower
        // than the 500ms specified in the stub factory above since some time will have passed. Our default is
        // 10s though so this should still verify the header was computed correctly.
        assertThat(TimeoutHeaderUtil.fromHeaderValue(grpcTimeout))
                .isLessThan(TimeUnit.MILLISECONDS.toNanos(500));

        assertThat(responseObserver.getError()).isInstanceOfSatisfying(
                StatusRuntimeException.class, t -> {
                    assertThat(t.getStatus().getCode()).isEqualTo(Code.DEADLINE_EXCEEDED);
                    assertThat(t.getStatus().getDescription()).contains("deadline exceeded after");
                });
    }
Must be at least {@link #unaryPayloadLength()}, plus some to account for encoding overhead.
grpc/src/test/java/com/linecorp/armeria/client/grpc/GrpcClientTest.java