You said one might be able to add another Bean implementing Baz and that would work?
Mark Struberg No, it should work as it is. @Inject Baz injects contextual reference (client proxy). "A contextual reference implements the given bean type and all bean types of the bean which are Java interfaces. A contextual reference is not, in general, required to implement all concrete bean types of the bean." (Contextual reference for a bean) So in this case, the client proxy only implements Baz and delegates to Foo contextual instance. I know it's a corner case. But it should work.
What about using an Injected Arquillian deployer and check...
Well, the problem is the test assertion (testing runtime behavior). I think the test must be either removed or left as it is. |