Replaced some calls to deprecated MetadataUtils methods in testing classes