So I spent some time searching on this and have some ideas on how to resolve my problem but thought I'd post this and see where it goes. So my problem is that I have a class I did not write but was trying to write the
unit test for. It has private members which are DAO's. In the class under test the fields are annotated @Inject. Mocking those DAO's isn't hard. I was going to use the @Mock annotation and then @InjectMocks for the instance of the class under tetst. Now to do that, I know one way to do that is use the @RunWith(MockitoJunitRunner.class) and then another might be use the setUp method and do like a Spring Reflection util and call inject mocks or something. I am going to look into that further. A problem comes up that the method I am trying to test also has calls to a static method. Mocking static calls I am well familiar with but it also requires the @RunWith annotation but with PowerMockRunner class and of course I am pretty sure @RunWith can only take a single class. So I am trying to avoid updating the class under test, being that I didn't write it, but am not real sure how to resolve doing the injection of the mock objects and being able to mock out static method calls. Sorry if this was already asked but I thought I did a decent search through the forum.