This test verifies just the discovery of producer/disposer/observer method and producer field on an EJB, not injection itself.
So we have one injection point (Apple) but...
There is no injection point in that test. Hence there is no AmbiguousResolutionException. Note that for disposer methods, the parameter annotated @Disposes is not an injection point. Looking at spec 3.4.2: Declaring disposer method:
A disposer method may be declared by annotating a parameter @javax.enterprise.inject.Disposes. That parameter is the disposed parameter. Qualifiers may be declared by annotating the disposed parameter
And a bit further it adds:
In addition to the disposed parameter, a disposer method may declare additional parameters, which may also specify qualifiers. These additional parameters are injection points.
One of the reasons, why it cannot be an IP is (spec link):
A disposer method may resolve to multiple producer methods or producer fields declared by the bean class
|