Add unit test for getLatestVersions