java_gen unit tests: make sure the entire message is consumed on read