utils: beefed up the bit_coder test.
key: simplified the code using bit_coder.