Rewrite tests for packages to use metadata.
Use metadata for messages.