@Test
    public void byte2Booleans() {
        Assert.assertEquals(0, CodecUtils.booleansToByte(null));
        Assert.assertEquals(0, CodecUtils.booleansToByte(new boolean[0]));

        // 01010101
        boolean[] bs = new boolean[] { false, true, false, true, false, true, false, true };
        byte b = CodecUtils.booleansToByte(bs);
        Assert.assertEquals(85, b);

        boolean[] bs2 = CodecUtils.byte2Booleans(b);
        for (int i = 0; i < bs.length; i++) {
            Assert.assertEquals(bs[i], bs2[i]);
        }
    }
@author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
core/common/src/test/java/com/alipay/sofa/rpc/common/utils/CodecUtilsTest.java