static HttpResponse of(ResponseHeaders headers, HttpData content, HttpHeaders trailers) {
        requireNonNull(headers, "headers");
        final HttpStatus status = headers.status();
        checkArgument(!status.isInformational(), "status: %s (expected: a non-1xx status)", status);

        requireNonNull(content, "content");
        requireNonNull(trailers, "trailers");

        if (headers.status().isContentAlwaysEmpty()) {
            if (!content.isEmpty()) {
                httpResponseUtilLogger.debug(
                        "Non-empty content found with an empty status: {}, content length: {}",
                        headers.status(), content.length());
                content.close();
                content = HttpData.empty();
            }
        }

        final ResponseHeaders newHeaders =
                maybeUpdateContentLengthAndEndOfStream(headers, content, trailers, false);
        final boolean contentIsEmpty = content.isEmpty();
        if (contentIsEmpty) {
            content.close();
            if (trailers.isEmpty()) {
                return new OneElementFixedHttpResponse(newHeaders);
            } else {
                return new TwoElementFixedHttpResponse(newHeaders, trailers);
            }
        }

        // `content` is not empty from now on.

        if (trailers.isEmpty()) {
            return new TwoElementFixedHttpResponse(newHeaders, content);
        } else {
            return new ThreeElementFixedHttpResponse(newHeaders, content, trailers);
        }
    }
Creates a new HTTP response of the specified objects.

@throws IllegalArgumentException if the status of the specified {@link ResponseHeaders} is
                                 {@linkplain HttpStatus#isInformational() informational}.
core/src/main/java/com/linecorp/armeria/common/HttpResponse.java