java - Mocking member variables of a class using Mockito - Stack Overflow
Then in your test set-up, you can use the whenNew method to have the constructor return a mock
whenNew(Second.class).withAnyArguments().thenReturn(mock(Second.class));
Read full article from java - Mocking member variables of a class using Mockito - Stack Overflow
No comments:
Post a Comment