private static HttpStatus defaultResponseStatus(Method method, Class<?> clazz) {
        final StatusCode statusCodeAnnotation = AnnotationUtil.findFirst(method, StatusCode.class);
        if (statusCodeAnnotation != null) {
            return HttpStatus.valueOf(statusCodeAnnotation.value());
        }

        // Set a default HTTP status code for a response depending on the return type of the method.
        final Class<?> returnType = typeToClass(unwrapAsyncType(method.getGenericReturnType()));

        final boolean isVoidReturnType = returnType == Void.class ||
                                         returnType == void.class ||
                                         KotlinUtil.isSuspendingAndReturnTypeUnit(method);

        if (isVoidReturnType) {
            final List<Produces> producesAnnotations = AnnotationUtil.findAll(method, Produces.class);
            if (!producesAnnotations.isEmpty()) {
                logger.warn("The following @Produces annotations '{}' for '{}.{}' will be ignored " +
                            "because the return type is void.",
                            producesAnnotations, clazz.getSimpleName(), method.getName());
            }
        }

        return isVoidReturnType ? HttpStatus.NO_CONTENT : HttpStatus.OK;
    }
Returns the list of {@link AnnotatedService} defined by {@link Path} and HTTP method annotations
from the specified {@code object}, {@link RequestConverterFunction}s, {@link ResponseConverterFunction}s,
{@link ExceptionHandlerFunction}s and {@link AnnotatedServiceExtensions}.
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotatedServiceFactory.java