@Test
    void testCustomSuccessMetrics() throws Exception {
        final WebClient client = WebClient.of(newUrl("h1c"));
        final HttpResponse response = client.get("/annotated/error");
        final String expectedSuccess =
                "http_status=\"404\",method=\"error\",result=\"success\",service=\"annotatedService\",} 1.0";
        final String expectedFailure =
                "http_status=\"404\",method=\"error\",result=\"failure\",service=\"annotatedService\",} 0.0";

        final AggregatedHttpResponse res = response.aggregate().get();
        assertThat(res.status()).isEqualTo(HttpStatus.NOT_FOUND);
        assertThat(res.contentUtf8()).isEqualTo("error");

        await().pollInSameThread()
               .untilAsserted(() -> {
                   final String metricReport = WebClient.of(newUrl("http"))
                                                        .get("/internal/metrics")
                                                        .aggregate()
                                                        .join()
                                                        .contentUtf8();
                   assertThat(metricReport).contains(expectedSuccess);
                   assertThat(metricReport).contains(expectedFailure);
               });
    }
This uses {@link ArmeriaAutoConfiguration} for integration tests.
application-autoConfTest.yml will be loaded with minimal settings to make it work.
spring/boot3-autoconfigure/src/test/java/com/linecorp/armeria/spring/ArmeriaAutoConfigurationTest.java