meta.setCdnLabel("test-cdn");
Cdn testCdn = new Cdn("test-cdn",
"Test CDN", "https://test.url.com");
when(cdnCurator.lookupByLabel("test-cdn")).thenReturn(testCdn);
Subscription sub = importer.importObject(om, reader, owner,
productsById, consumerDto, meta);
assertEquals(pool.getId(), sub.getUpstreamPoolId());
assertEquals(consumer.getUuid(), sub.getUpstreamConsumerId());
assertEquals(ent.getId(), sub.getUpstreamEntitlementId());
assertEquals(owner, sub.getOwner());
assertEquals(ent.getStartDate(), sub.getStartDate());
assertEquals(ent.getEndDate(), sub.getEndDate());
assertEquals(pool.getAccountNumber(), sub.getAccountNumber());
assertEquals(pool.getContractNumber(), sub.getContractNumber());
assertEquals(pool.getOrderNumber(), sub.getOrderNumber());
assertEquals(ent.getQuantity().intValue(), sub.getQuantity().intValue());
assertEquals(parentProduct, sub.getProduct());
assertEquals(provided.size(), sub.getProvidedProducts().size());
assertEquals(pp1.getProductId(), sub.getProvidedProducts().
iterator().next().getId());
assertEquals(subProduct, sub.getDerivedProduct());
assertEquals(1, sub.getDerivedProvidedProducts().size());
assertEquals(subProvided1.getProductId(), sub.getDerivedProvidedProducts().
iterator().next().getId());
assertNotNull(sub.getCertificate());
CertificateSerial serial = sub.getCertificate().getSerial();
assertEquals(cert.getSerial().isCollected(), serial.isCollected());
assertEquals(cert.getSerial().getExpiration(), serial.getExpiration());
assertEquals(cert.getSerial().getCreated(), serial.getCreated());
assertEquals(cert.getSerial().getUpdated(), serial.getUpdated());
assertEquals(sub.getCdn().getLabel(), meta.getCdnLabel());
}