// Create derived pool referencing the entitlement just made:
Pool derivedPool = new Pool(owner, product.getId(), product.getName(),
new HashSet<ProvidedProduct>(), 1L, TestUtil.createDate(2011, 3, 2),
TestUtil.createDate(2055, 3, 2),
"", "", "");
derivedPool.setSourceStack(new SourceStack(consumer, expectedStackId));
derivedPool.setAttribute("requires_host", consumer.getUuid());
poolCurator.create(derivedPool);
Pool pool = poolCurator.getSubPoolForStackId(consumer, expectedStackId);