[PMD-987] Fixed metadata import and broken unit test