@BeforeEach
    void before() {
        when(channelHandlerContext.channel()).thenReturn(channel);

        DefaultAttributeMap attributeMap = new DefaultAttributeMap();
        attributeMap.attr(SslHandshakeInfoHandler.ATTR_SSL_INFO).set(sslHandshakeInfo);
        when(channel.attr(any())).thenAnswer(arg -> attributeMap.attr((AttributeKey) arg.getArguments()[0]));

        headers = new DefaultHttpHeaders();
        when(msg.headers()).thenReturn(headers);
        headers.add(HttpHeaderNames.HOST, "netflix.com");
    }
Strip Untrusted Proxy Headers Handler Test

@author Arthur Gonigberg
@since May 27, 2020
zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandlerTest.java