Subscription s = createVirtLimitSub("virtLimitProduct", 10, "10");
consumer.setType(new ConsumerType(ConsumerTypeEnum.CANDLEPIN));
List<Pool> pools = poolRules.createPools(s);
assertEquals(2, pools.size());
Pool physicalPool = pools.get(0);
physicalPool.setId("physical");
Pool virtBonusPool = pools.get(1);
virtBonusPool.setId("virt");
assertEquals(new Long(10), physicalPool.getQuantity());
assertEquals(0, physicalPool.getAttributes().size());
// Quantity on bonus pool should be virt limit * sub quantity:
assertEquals(new Long(100), virtBonusPool.getQuantity());
assertEquals("true", virtBonusPool.getAttributeValue("virt_only"));
assertEquals("10", virtBonusPool.getProductAttribute("virt_limit").getValue());
Entitlement e = new Entitlement(physicalPool, consumer, 1);
PoolHelper postHelper = new PoolHelper(poolManagerMock, productCache, e);
List<Pool> poolList = new ArrayList<Pool>();
poolList.add(virtBonusPool);