HelloService { @Get("/hello") @ProducesJson public HttpResponse helloJson() { return HttpResponse.of(HttpStatus.OK, MediaType.JSON_UTF_8, "{ \"name\": \"Armeria\" }"); }  @Get("/hello") @ProducesText String helloText(); @Get("/hello") @ProducesJson HttpResponse helloJson();  }
@SuppressWarnings("MultipleExceptionsDeclaredOnTestMethod") @Test void testHelloService_JSON() throws ExecutionException, InterruptedException { final HttpResponse res = service.helloJson(); final AggregatedHttpResponse aggregatedHttpResponse = res.aggregate().get(); assertThat(aggregatedHttpResponse.status()).isEqualTo(HttpStatus.OK); assertThat(aggregatedHttpResponse.contentType()).isEqualTo(JSON_UTF_8); assertThat(aggregatedHttpResponse.contentUtf8()).isEqualTo("{ \"name\": \"Armeria\" }"); }