CdnManager { @Transactional public void updateCdn(Cdn cdn) { CdnCertificate cert = cdn.getCertificate(); if (cert != null && cert.getSerial() != null) { certSerialCurator.saveOrUpdateAll(Arrays.asList(cert.getSerial()), false, false); } cdnCurator.update(cdn); } @Inject  CdnManager(CdnCurator cdnCurator, PoolCurator poolCurator,
        CertificateSerialCurator certSerialCurator); @Transactional Cdn createCdn(Cdn cdn); @Transactional void updateCdn(Cdn cdn); @Transactional void deleteCdn(Cdn cdn);  }
@Test public void updateCdn() throws Exception { Cdn cdn = createCdn("test_cdn"); assertEquals("Test CDN", cdn.getName()); cdn.setName("Updated CDN"); manager.updateCdn(cdn); Cdn fetched = curator.getByLabel(cdn.getLabel()); assertNotNull(fetched); assertEquals(cdn.getLabel(), fetched.getLabel()); assertEquals("Updated CDN", fetched.getName()); }