implement MessagePacket decoder and create TestCode