fixes in unittest for MetadataLoader