proprot/tst/com/amazonaws/proprot/ProxyProtocolTest.java [63:83]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        tlv.setValue(new byte[] {1, 2, 3, 4, 5, 6, 7, 8});
        header.addTlv(tlv);

        ProxyProtocol protocol = new ProxyProtocol();

        // write
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        protocol.write(header, out);

        // read
        ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
        Header header2 = protocol.read(in);

        // validate
        assertEquals(header.getCommand(), header2.getCommand());
        assertEquals(header.getAddressFamily(), header2.getAddressFamily());
        assertEquals(header.getTransportProtocol(), header2.getTransportProtocol());
        assertArrayEquals(header.getSrcAddress(), header2.getSrcAddress());
        assertArrayEquals(header.getDstAddress(), header2.getDstAddress());
        assertEquals(header.getSrcPort(), header2.getSrcPort());
        assertEquals(header.getDstPort(), header2.getDstPort());
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



proprot/tst/com/amazonaws/proprot/ProxyProtocolTest.java [150:169]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        tlv.setValue(new byte[] {1, 2, 3, 4, 5, 6, 7, 8});
        header.addTlv(tlv);

        // write
        ProxyProtocol protocol = new ProxyProtocol();
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        protocol.write(header, out);

        // read
        ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
        Header header2 = protocol.read(in);

        // validate
        assertEquals(header.getCommand(), header2.getCommand());
        assertEquals(header.getAddressFamily(), header2.getAddressFamily());
        assertEquals(header.getTransportProtocol(), header2.getTransportProtocol());
        assertArrayEquals(header.getSrcAddress(), header2.getSrcAddress());
        assertArrayEquals(header.getDstAddress(), header2.getDstAddress());
        assertEquals(header.getSrcPort(), header2.getSrcPort());
        assertEquals(header.getDstPort(), header2.getDstPort());
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



