@Test
    public void test_createUsingIndex() {
        for (int i = 0; i < 7; ++i) {
            Assert.assertTrue(ProtocolSwitch.create(new int[] { i }).isOn(i));
        }

        int size = 7;
        int[] a = new int[size];
        for (int i = 0; i < size; ++i) {
            a[i] = i;
        }
        ProtocolSwitch status = ProtocolSwitch.create(a);
        for (int i = 0; i < size; ++i) {
            Assert.assertTrue(status.isOn(i));
        }
    }
@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