Product prod = TestUtil.createProduct();
Pool p = TestUtil.createPool(prod);
p.setDerivedProductId("sub-prod-id");
ValidationResult results = enforcer.preEntitlement(c, p, 1, CallerType.LIST_POOLS);
assertNotNull(results);
assertEquals(1, results.getWarnings().size());
assertTrue(results.getErrors().isEmpty());
ValidationWarning warning = results.getWarnings().get(0);
assertEquals("rulewarning.derivedproduct.unsupported.by.consumer",
warning.getResourceKey());
}