Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<String> mockList = mock(List.class);
- doAnswer(new Answer<Void>() {
- @Override
- public Void answer(InvocationOnMock invocationOnMock) throws Throwable {
- return null;
- }
- }).when(mockList).add("test");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement