@Test
public void testMSBMask() {

    int numBits = 1; // MSB
    int mask = BitBufferHelper.getMSBMask(numBits);
    Assert.assertTrue(mask == 128);
    numBits = 8;
    mask = BitBufferHelper.getMSBMask(numBits);
    Assert.assertTrue(mask == 255);
    numBits = 2;
    mask = BitBufferHelper.getMSBMask(numBits);
    Assert.assertTrue(mask == 192);
}