fix for encodeMessage tests (pimatic/pimatic#222))
added missing footer to encodeMessage (pimatic/pimatic#222)