@@ -0,0 +1,1569 @@
+package com.netflix.netty.common.proxyprotocol;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertNull;%0Aimport com.netflix.netty.common.SourceAddressChannelHandler;%0Aimport io.netty.buffer.ByteBuf;%0Aimport io.netty.buffer.Unpooled;%0Aimport io.netty.channel.embedded.EmbeddedChannel;%0Aimport io.netty.handler.codec.haproxy.HAProxyMessageDecoder;%0Aimport java.net.InetSocketAddress;%0Aimport java.nio.charset.StandardCharsets;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.junit.runners.JUnit4;%0A%0A@RunWith(JUnit4.class)%0Apublic class HAProxyMessageChannelHandlerTest %7B%0A%0A    @Test%0A    public void setClientDestPortForHAPM() %7B%0A        EmbeddedChannel channel = new EmbeddedChannel();%0A        // This is to emulate %60ElbProxyProtocolChannelHandler%60%0A        channel.pipeline()%0A                .addLast(HAProxyMessageDecoder.class.getSimpleName(), new HAProxyMessageDecoder())%0A                .addLast(HAProxyMessageChannelHandler.class.getSimpleName(), new HAProxyMessageChannelHandler());%0A%0A        ByteBuf buf = Unpooled.wrappedBuffer(%0A                %22PROXY TCP4 192.168.0.1 124.123.111.111 10008 443%5Cr%5Cn%22.getBytes(StandardCharsets.US_ASCII));%0A        channel.writeInbound(buf);%0A%0A        Object result = channel.readInbound();%0A        assertNull(result);%0A%0A        InetSocketAddress destAddress = channel%0A                .attr(SourceAddressChannelHandler.ATTR_PROXY_PROTOCOL_DESTINATION_ADDRESS).get();%0A        assertEquals(%22124.123.111.111%22, destAddress.getHostString());%0A        assertEquals(443, destAddress.getPort());%0A    %7D%0A%7D

Add a basic test for HAPM channel handler