ppset.add(prod);
Set<Product> sppSet = new HashSet<Product>();
sppSet.add(subProvidedProduct);
when(pool.getId()).thenReturn("MockedPoolId");
when(pool.getProvidedProducts()).thenReturn(ppset);
<BUG>when(pc.getPoolProvidedProductsCached(pool.getId())).thenReturn(ppset);
when(pool.getProduct()).thenReturn(prod1);</BUG>
when(pool.getDerivedProvidedProducts()).thenReturn(sppSet);
<BUG>when(pc.getPoolDerivedProvidedProductsCached(pool.getId())).thenReturn(sppSet);
when(pool.getDerivedProduct()).thenReturn(subProduct);</BUG>
when(ent.getPool()).thenReturn(pool);

ppset.add(prod);
Set<Product> sppSet = new HashSet<Product>();
sppSet.add(subProvidedProduct);
when(pool.getId()).thenReturn("MockedPoolId");
when(pool.getProvidedProducts()).thenReturn(ppset);
when(pc.getPoolProvidedProductsCached(pool)).thenReturn(ppset);
when(pool.getProduct()).thenReturn(prod1);
when(pool.getDerivedProvidedProducts()).thenReturn(sppSet);
when(pc.getPoolDerivedProvidedProductsCached(pool)).thenReturn(sppSet);
when(pool.getDerivedProduct()).thenReturn(subProduct);
when(ent.getPool()).thenReturn(pool);
