Added test for encode/decode binaries and terms