@Override
    @SuppressWarnings("MagicNumber")
    public void clear() {
        pos = 0;
        if (buffer != null && buffer.length > initialSize * 8) {
            buffer = new byte[initialSize * 8];
        }
        version = UNKNOWN;
        wanProtocolVersion = UNKNOWN;
    }
@Test
    public void testClear_bufferNull() {
        out.buffer = null;
        out.clear();
        assertNull(out.buffer);
    }