private HttpResponseStatus getHttpResponseStatus(ResponseStatus responseStatus) {
    HttpResponseStatus status;
    switch (responseStatus) {
      case Continue:
        nettyMetrics.continueCount.inc();
        status = HttpResponseStatus.CONTINUE;
        break;
      case Ok:
        nettyMetrics.okCount.inc();
        status = HttpResponseStatus.OK;
        break;
      case Created:
        nettyMetrics.createdCount.inc();
        status = HttpResponseStatus.CREATED;
        break;
      case Accepted:
        nettyMetrics.acceptedCount.inc();
        status = HttpResponseStatus.ACCEPTED;
        break;
      case NoContent:
        nettyMetrics.noContentCount.inc();
        status = HttpResponseStatus.NO_CONTENT;
        break;
      case PartialContent:
        nettyMetrics.partialContentCount.inc();
        status = HttpResponseStatus.PARTIAL_CONTENT;
        break;
      case NotModified:
        nettyMetrics.notModifiedCount.inc();
        status = HttpResponseStatus.NOT_MODIFIED;
        break;
      case BadRequest:
        nettyMetrics.badRequestCount.inc();
        status = HttpResponseStatus.BAD_REQUEST;
        break;
      case Unauthorized:
        nettyMetrics.unauthorizedCount.inc();
        status = HttpResponseStatus.UNAUTHORIZED;
        break;
      case NotFound:
        nettyMetrics.notFoundCount.inc();
        status = HttpResponseStatus.NOT_FOUND;
        break;
      case Conflict:
        nettyMetrics.conflictCount.inc();
        status = HttpResponseStatus.CONFLICT;
        break;
      case Gone:
        nettyMetrics.goneCount.inc();
        status = HttpResponseStatus.GONE;
        break;
      case Forbidden:
        nettyMetrics.forbiddenCount.inc();
        status = HttpResponseStatus.FORBIDDEN;
        break;
      case ProxyAuthenticationRequired:
        nettyMetrics.proxyAuthRequiredCount.inc();
        status = HttpResponseStatus.PROXY_AUTHENTICATION_REQUIRED;
        break;
      case RangeNotSatisfiable:
        nettyMetrics.rangeNotSatisfiableCount.inc();
        status = HttpResponseStatus.REQUESTED_RANGE_NOT_SATISFIABLE;
        break;
      case TooManyRequests:
        nettyMetrics.tooManyRequests.inc();
        status = HttpResponseStatus.TOO_MANY_REQUESTS;
        break;
      case RequestTooLarge:
        nettyMetrics.requestTooLargeCount.inc();
        status = HttpResponseStatus.REQUEST_ENTITY_TOO_LARGE;
        break;
      case InternalServerError:
        nettyMetrics.internalServerErrorCount.inc();
        status = HttpResponseStatus.INTERNAL_SERVER_ERROR;
        break;
      case ServiceUnavailable:
        nettyMetrics.serviceUnavailableErrorCount.inc();
        status = HttpResponseStatus.SERVICE_UNAVAILABLE;
        break;
      case InsufficientCapacity:
        nettyMetrics.insufficientCapacityErrorCount.inc();
        status = HttpResponseStatus.INSUFFICIENT_STORAGE;
        break;
      case PreconditionFailed:
        nettyMetrics.preconditionFailedErrorCount.inc();
        status = HttpResponseStatus.PRECONDITION_FAILED;
        break;
      case MethodNotAllowed:
        nettyMetrics.methodNotAllowedErrorCount.inc();
        status = HttpResponseStatus.METHOD_NOT_ALLOWED;
        break;
      default:
        nettyMetrics.unknownResponseStatusCount.inc();
        status = HttpResponseStatus.INTERNAL_SERVER_ERROR;
        break;
    }
    return status;
  }
Converts a {@link ResponseStatus} into a {@link HttpResponseStatus}.
@param responseStatus {@link ResponseStatus} that needs to be mapped to a {@link HttpResponseStatus}.
@return the {@link HttpResponseStatus} that maps to the {@link ResponseStatus}.
ambry-rest/src/main/java/com/github/ambry/rest/NettyResponseChannel.java