Added a test to check that the metadata assignment is working correctly