Test length-prefixed and non-length-prefixed generic messages