Advertisement
Guest User

new Answer<Void>

a guest
Jul 2nd, 2012
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.28 KB | None | 0 0
  1.         List<String> mockList = mock(List.class);
  2.         doAnswer(new Answer<Void>() {
  3.             @Override
  4.             public Void answer(InvocationOnMock invocationOnMock) throws Throwable {
  5.                 return null;
  6.             }
  7.         }).when(mockList).add("test");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement