Replace deprecated has_metadata with contains
Remove unused test file