I have a class containing the following code:
@Inject
@Any
private Instance<SomeInterface> SomeInterfaces;
This allows me to then iterate over all implementations of that interface.
Now, I want to test this, so I declare some @Mock
's of those interfaces, and want to @InjectMocks
them into my unit under test. But that fails.
Is it possible to do something like that nicely, or do I have to create a @Mock
for Instance<SomeInterface>