17181920212223
this.priceCalculatorFactory = priceCalculatorFactory; } @Produces @ExampleProductQualifier public PriceCalculator create() { return priceCalculatorFactory.create(new Product(0)); }
28293031323334
@Inject private PriceCalculator.Factory priceCalculatorFactory; @Test public void testExamplePriceCalculator() { assertThat(priceCalculatorFactory.create(new Product(12)).getFinalPrice()).isEqualTo(11); }