Add more unit tests for metadata matching.