Skip to content

Instantly share code, notes, and snippets.

@donchan922
Created July 11, 2019 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donchan922/7b9fb202f518287399f4346f450cca55 to your computer and use it in GitHub Desktop.
Save donchan922/7b9fb202f518287399f4346f450cca55 to your computer and use it in GitHub Desktop.
List mockedList = mock(List.class);
Mockito.doNothing().doNothing().doThrow(new RuntimeException()).when(mockedList).clear();
mockedList.clear();
mockedList.clear();
mockedList.clear(); // RuntimeException発生
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment