CdnManager { @Transactional public Cdn createCdn(Cdn cdn) { CdnCertificate cert = cdn.getCertificate(); if (cert != null && cert.getSerial() != null) { certSerialCurator.create(cert.getSerial()); } return cdnCurator.create(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 testCreateCdn() throws Exception { Cdn cdn = createCdn("test_cdn"); Cdn fetched = curator.getByLabel(cdn.getLabel()); assertNotNull(fetched); assertEquals("test_cdn", fetched.getLabel()); }