@Test public void testStorageDomainTemplateLinks() throws Exception { Template template = new Template(); template.setId(TEMPLATE_ID); template.setStorageDomain(new StorageDomain()); template.getStorageDomain().setId(STORAGE_DOMAIN_ID); template = LinkHelper.addLinks(template); assertEquals(STORAGE_DOMAIN_TEMPLATE_HREF, template.getHref()); assertEquals(STORAGE_DOMAIN_HREF, template.getStorageDomain().getHref()); }