tests: Added TestEncodeDecodeInterest.