@Test
public void testPopulateExtensionBundleVersionExtensionMetadataLinks() {

    extensionMetadata.forEach(i -> Assert.assertNull(i.getLink()));
    extensionMetadata.forEach(i -> Assert.assertNull(i.getLinkDocs()));
    linkService.populateLinks(extensionMetadata);
    extensionMetadata.forEach(e -> {
        final String extensionUri = "bundles/" + e.getBundleInfo().getBundleId()
                + "/versions/" + e.getBundleInfo().getVersion()
                + "/extensions/" + e.getName();
        Assert.assertEquals(extensionUri, e.getLink().getUri().toString());
        Assert.assertEquals(extensionUri + "/docs", e.getLinkDocs().getUri().toString());
    });
}