Added test for encodeBit