@Test
    public void test_createUsingByte() {
        Assert.assertFalse(ProtocolSwitch.create(0).isOn(0));
        Assert.assertTrue(ProtocolSwitch.create(1).isOn(0));
        Assert.assertTrue(ProtocolSwitch.create(2).isOn(1));
        Assert.assertTrue(ProtocolSwitch.create(4).isOn(2));
        Assert.assertTrue(ProtocolSwitch.create(8).isOn(3));
        Assert.assertTrue(ProtocolSwitch.create(3).isOn(0));
        Assert.assertTrue(ProtocolSwitch.create(3).isOn(1));
        Assert.assertFalse(ProtocolSwitch.create(3).isOn(2));
        Assert.assertTrue(ProtocolSwitch.create(64).isOn(6));
        Assert.assertFalse(ProtocolSwitch.create(64).isOn(0));
        Assert.assertTrue(ProtocolSwitch.create(127).isOn(0));
        Assert.assertTrue(ProtocolSwitch.create(127).isOn(1));
        Assert.assertTrue(ProtocolSwitch.create(127).isOn(6));
        Assert.assertFalse(ProtocolSwitch.create(127).isOn(7));
        try {
            ProtocolSwitch.create(255);
            Assert.fail("Should not reach here!");
        } catch (IllegalArgumentException e) {
        }
    }
@author tsui
@version $Id: ProtocolSwitchStatusTest.java, v 0.1 2017-10-09 20:23 tsui Exp $
src/test/java/com/alipay/remoting/inner/utiltest/ProtocolSwitchTest.java