Added test for clean_metadata function.