@Test
    void testHeapDump() throws Exception {
        final HttpResponse res = client.get("/internal/actuator/heapdump");
        final AtomicLong remainingBytes = new AtomicLong();
        StepVerifier.create(res)
                    .assertNext(obj -> {
                        assertThat(obj).isInstanceOf(ResponseHeaders.class);
                        final ResponseHeaders headers = (ResponseHeaders) obj;
                        assertThat(headers.status()).isEqualTo(HttpStatus.OK);
                        assertThat(headers.contentType()).isEqualTo(MediaType.OCTET_STREAM);
                        assertThat(headers.get(HttpHeaderNames.CONTENT_DISPOSITION))
                                // e.g. attachment;filename=heap-2022-01-19-22-064029423405632482108.hprof
                                .startsWith("attachment;filename=heap");
                        final long contentLength = headers.getLong(HttpHeaderNames.CONTENT_LENGTH, -1);
                        assertThat(contentLength).isPositive();
                        remainingBytes.set(contentLength);
                    })
                    .thenConsumeWhile(obj -> {
                        assertThat(obj).isInstanceOf(HttpData.class);
                        final HttpData data = (HttpData) obj;
                        final long newRemainingBytes = remainingBytes.addAndGet(-data.length());
                        assertThat(newRemainingBytes).isNotNegative();
                        return newRemainingBytes > 0; // Stop at the last HttpData.
                    })
                    .expectNextCount(1) // Skip the last HttpData.
                    .verifyComplete();

        assertThat(remainingBytes).hasValue(0);
    }
This uses {@link com.linecorp.armeria.spring.ArmeriaAutoConfiguration} for integration tests.
{@code application-autoConfTest.yml} will be loaded with minimal settings to make it work.
spring/boot3-actuator-autoconfigure/src/test/java/com/linecorp/armeria/spring/actuate/ArmeriaSpringActuatorAutoConfigurationTest.java