@Test
    public void short2bytes() {
        short i = 0;
        byte[] bs = CodecUtils.short2bytes(i);
        Assert.assertArrayEquals(bs, new byte[] { 0, 0 });

        i = 1000;
        bs = CodecUtils.short2bytes(i);
        Assert.assertArrayEquals(bs, new byte[] { 3, -24 });

        short s = 258; // =1*256+2
        bs = CodecUtils.short2bytes(s);
        Assert.assertEquals(bs[0], 1);
        Assert.assertEquals(bs[1], 2);
    }
@author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
core/common/src/test/java/com/alipay/sofa/rpc/common/utils/CodecUtilsTest.java