Add tests for metadata.