String slaPremiumProdId = "premium-sla-product";
Product slaPremiumProduct = new Product(slaPremiumProdId,
"Product with SLA Permium");
slaPremiumProduct.setAttribute("support_level", "Premium");
Pool slaPremiumPool = TestUtil.createPool(owner, slaPremiumProduct);
slaPremiumPool.setId("pool-with-premium-sla");
slaPremiumPool.setProductAttribute("support_level", "Premium",
slaPremiumProdId);
// Create Standard SLA Product
String slaStandardProdId = "standard-sla-product";
Product slaStandardProduct = new Product(slaStandardProdId,
"Product with SLA Standard");
slaStandardProduct.setAttribute("support_level", "Standard");
Pool slaStandardPool = TestUtil.createPool(owner, slaStandardProduct);
slaStandardPool.setId("pool-with-standard-sla");
slaStandardPool.setProductAttribute("support_level", "Standard",
slaStandardProdId);
// Create a product with no SLA.
Product noSLAProduct = new Product(productId, "A test product");
Pool noSLAPool = TestUtil.createPool(owner, noSLAProduct);
noSLAPool.setId("pool-1");
// Ensure correct products are returned when requested.
when(this.prodAdapter.getProductById(productId)).thenReturn(
noSLAProduct);
when(this.prodAdapter.getProductById(slaPremiumProdId)).thenReturn(