@Test
    public void setBooleanToByte() {
        byte b = 0x35; // 0011 0101
        byte b1 = CodecUtils.setBooleanToByte(b, 0, true);
        Assert.assertEquals(b, b1);
        byte b2 = CodecUtils.setBooleanToByte(b, 1, false);
        Assert.assertEquals(b, b2);

        byte b3 = CodecUtils.setBooleanToByte(b, 3, true);
        Assert.assertFalse(b == b3);
        Assert.assertTrue(CodecUtils.getBooleanFromByte(b3, 3));
        byte b4 = CodecUtils.setBooleanToByte(b, 4, false);
        Assert.assertFalse(b == b4);
        Assert.assertFalse(CodecUtils.getBooleanFromByte(b4, 4));
    }
@author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
core/common/src/test/java/com/alipay/sofa/rpc/common/utils/CodecUtilsTest.java