@Test
    public void copyOf() {
        byte[] bs = new byte[] { 1, 2, 3, 5 };
        byte[] cp = CodecUtils.copyOf(bs, 3);
        Assert.assertArrayEquals(cp, new byte[] { 1, 2, 3 });

        cp = CodecUtils.copyOf(bs, 5);
        Assert.assertArrayEquals(cp, new byte[] { 1, 2, 3, 5, 0 });
    }
@author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
core/common/src/test/java/com/alipay/sofa/rpc/common/utils/CodecUtilsTest.java