void withServer(final Duration gracefulShutdownTimeout,
            final BiConsumer<WaitingTestService, GrpcServerLifecycle> executuable) {
        final GrpcServerFactory factory = new InProcessGrpcServerFactory("test", new GrpcServerProperties());
        final WaitingTestService service = new WaitingTestService();

        factory.addService(new GrpcServiceDefinition("service", WaitingTestService.class, service.bindService()));

        final GrpcServerLifecycle lifecycle =
                new GrpcServerLifecycle(factory, gracefulShutdownTimeout, this.eventPublisher);
        try {
            assertDoesNotThrow(() -> executuable.accept(service, lifecycle));
        } finally {
            lifecycle.stop();
        }
    }
Tests for {@link GrpcServerLifecycle}'s shutdown behavior using an in-process server/channel.
tests/src/test/java/net/devh/boot/grpc/test/shutdown/GrpcServerLifecycleWithCallsTest.java