Added more tests for Encoding/Decoding