Merge pull request #532 from e-cuellar/5.2

[BACKLOG-290] REST: Metadata import refactoring as requested by Nick
[BACKLOG-290] Fixed unit tests