/** * Sets up both the bean and the @New bean with different configurations so that the correct producer method used can be * determined. * * @throws Exception */ @Test @SpecAssertion(section = NEW_EE, id = "v") public void testNewBeanHasNoProducerMethods() throws Exception { FoxLocal fox = getContextualReference(FoxLocal.class); FoxLocal newFox = getContextualReference(FoxLocal.class, New.Literal.of(Fox.class)); fox.setNextLitterSize(3); newFox.setNextLitterSize(5); @SuppressWarnings("serial") Litter theOnlyLitter = getContextualReference(Litter.class, new AnnotationLiteral<Tame>() { }); assert theOnlyLitter.getQuantity() == fox.getNextLitterSize(); }