@Test
public void testPopulateItemLinks() {

    items.forEach(i -> Assert.assertNull(i.getLink()));
    linkService.populateLinks(items);
    items.forEach(i -> {
        if (i.getType() == BucketItemType.Flow) {
            Assert.assertEquals("buckets/" + i.getBucketIdentifier() + "/flows/" + i.getIdentifier(), i.getLink().getUri().toString());
        } else {
            Assert.assertEquals("bundles/" + i.getIdentifier(), i.getLink().getUri().toString());
        }
    });
}