public static ByteBuf copyShort(int value) {
        ByteBuf buf = buffer(2);
        buf.writeShort(value);
        return buf;
    }
@Test
    public void testWrapShortFromIntArray() {
        ByteBuf buffer = copyShort(1, 4);
        assertEquals(4, buffer.capacity());
        assertEquals(1, buffer.readShort());
        assertEquals(4, buffer.readShort());
        assertFalse(buffer.isReadable());
        buffer.release();

        buffer = copyShort((int[]) null);
        assertEquals(0, buffer.capacity());
        buffer.release();

        buffer = copyShort(new int[] {});
        assertEquals(0, buffer.capacity());
        buffer.release();
    }