@Test
    void testGracefulShutdown() throws Exception {
        final long startTime = System.nanoTime();
        server.stop().join();
        assertThat(System.nanoTime() - startTime).isGreaterThanOrEqualTo(duration.toNanos());
    }
This uses {@link ArmeriaAutoConfiguration} for integration tests.
{@code application-gracefulShutdownTest.yml} will be loaded with minimal settings to make it work.
spring/boot3-autoconfigure/src/test/java/com/linecorp/armeria/spring/ArmeriaGracefulShutdownConfigurationTest.java