proprot/tst/com/amazonaws/proprot/ProxyProtocolTest.java [148:167]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        TlvRaw tlv = new TlvRaw();
        tlv.setType(0xF0);
        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());
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



proprot/tst/com/amazonaws/proprot/ProxyProtocolTest.java [183:202]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        TlvRaw tlv = new TlvRaw();
        tlv.setType(0xF0);
        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());
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



