Added entity decoding/encoding tests