HuffmanCode passes fundamental tests