Is it possible to do these tests against the API?  I.e. right here you are verifying that "messageIsValid()" does stuff, but what's really interesting isn't so much that this function validates things, it's that the API does something when this is true or false.

If we rethink the test to exercise this functionality via its public API, then we also do not have to expose these methods for testing ;)