@Override
    public String getRemoteHost() {
        String hostHeader;
        if (request.getRequestSource().equals(RequestSource.ALB)) {
            hostHeader = Objects.nonNull(request.getHeaders()) ?
                    request.getHeaders().get(HttpHeaders.HOST) :
                    request.getMultiValueHeaders().getFirst(HttpHeaders.HOST);
        } else {
            hostHeader = request.getMultiValueHeaders().getFirst(HttpHeaders.HOST);
        }
        // the host header has the form host:port, so we split the string to get the host part
        return Arrays.asList(hostHeader.split(":")).get(0);
    }
@Test
    void getRemoteHost_albHostHeader_multiValue_returnsHostHeader() {
        initAwsProxyHttpServletRequestTest("ALB");
        AwsProxyRequest proxyReq = new AwsProxyRequestBuilder("/test", "GET")
                .header(HttpHeaders.HOST, "testapi.us-east-1.elb.amazonaws.com")
                .alb().build();
        proxyReq.setHeaders(null);
        HttpServletRequest servletRequest = new AwsProxyHttpServletRequest(proxyReq, null, null);

        String host = servletRequest.getRemoteHost();
        assertEquals("testapi.us-east-1.elb.amazonaws.com", host);
    }