@Get("/param/map-invalid")
        public String invalidMapParam(@Param("param") Map<String, String> param) {
            return "Should not reach here";
        }
")
        public String colonLiteralGlob() {
            return "colon-literal-glob";
        }

        @Get("regex:/:colon:literal:regex:/(?<param>[^/]+)$")
        public String colonLiteralRegex(@Param String param) {
            return "colon-literal-" + param;
        }
    }

    static class VoidTo200ResponseConverter implements ResponseConverterFunction {
        @Override
        public HttpResponse convertResponse(ServiceRequestContext ctx,
                                            ResponseHeaders headers,
                                            @Nullable Object result,
                                            HttpHeaders trailers) throws Exception {
            if (result == null) {
                return HttpResponse.of(HttpStatus.OK);
            }
            return ResponseConverterFunction.fallthrough();
        }
    }

    @ResponseConverter(TypedNumberConverterFunction.class)
    @ResponseConverter(TypedStringConverterFunction.class)
    @ResponseConverter(UnformattedStringConverterFunction.class)
    public static class MyAnnotatedService2 {
        // Case 4: returns Integer type and handled by class-default Number -> HttpResponse converter.
        @Get
        @Path("/int/{var}")
        public CompletionStage<Integer> returnInt(@Param("var") int var) {
            return CompletableFuture.supplyAsync(() -> var);
        }

        // Case 5: returns Long type and handled by class-default Number -> HttpResponse converter.
        @Post
        @Path("/long/:var")
        public Long returnLong(@Param("var") long var) {
            return var;
        }

        // Case 6: returns String type and handled by custom String -> HttpResponse converter.
        @Get
        @Path("/string/{var}")
        @ResponseConverter(NaiveStringConverterFunction.class)
        public String returnString(@Param("var") String var) {
            return var;
        }

        @Get
        @Path("/boolean/{var}")
        public String returnBoolean(@Param("var") boolean var) {
            return Boolean.toString(var);
        }

        @Nullable
        @Get("/null1")
        public Object returnNull1() {
            return null;
        }

        @Get("/null2")
        public CompletionStage<Object> returnNull2() {
            return UnmodifiableFuture.completedFuture(null);
        }
    }

    @ResponseConverter(TypedNumberConverterFunction.class)
    public static class MyAnnotatedService3 {
        @Get
        @Path("/int/{var}")
        public CompletionStage<Integer> returnInt(@Param("var") int var) {
            return CompletableFuture.supplyAsync(() -> var);
        }
    }

    @ResponseConverter(TypedStringConverterFunction.class)
    public static class MyAnnotatedService4 {
        @Get
        @Path("/string/{var}")
        public String returnString(@Param("var") String var) {
            return var;
        }

        @Get
        @Path("/no-path-param")
        public String noPathParam() {
            return "no-path-param";
        }
    }

    // Aggregation Test
    @ResponseConverter(UnformattedStringConverterFunction.class)
    public static class MyAnnotatedService5 {
        @Post
        @Path("/a/string")
        public String postString(AggregatedHttpRequest request, RequestContext ctx) {
            validateContext(ctx);
            return request.contentUtf8();
        }

        @Post
        @Path("/a/string-async1")
        public CompletionStage<String> postStringAsync1(AggregatedHttpRequest request, RequestContext ctx) {
            validateContext(ctx);
            return CompletableFuture.supplyAsync(request::contentUtf8);
        }

        @Post
        @Path("/a/string-async2")
        public HttpResponse postStringAsync2(AggregatedHttpRequest request, RequestContext ctx) {
            validateContext(ctx);
            final HttpResponseWriter response = HttpResponse.streaming();
            response.write(ResponseHeaders.of(HttpStatus.OK));
            response.write(request.content());
            response.close();
            return response;
        }

        @Post
        @Path("/a/string-aggregate-response1")
        public AggregatedHttpResponse postStringAggregateResponse1(AggregatedHttpRequest request,
                                                                   RequestContext ctx) {
            validateContext(ctx);
            return AggregatedHttpResponse.of(ResponseHeaders.of(HttpStatus.OK), request.content());
        }
    }

    /**
An annotated service that's used for testing non-default path mappings.
core/src/test/java/com/linecorp/armeria/internal/server/annotation/AnnotatedServiceTest.java