Advertisement
Guest User

Untitled

a guest
Aug 29th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. @Test
  2. void exceptionTesting() {
  3. Throwable exception = expectThrows(IllegalArgumentException.class, () -> {
  4. throw new IllegalArgumentException("id must not be null");
  5. });
  6. assertEquals("id must not be null", exception.getMessage());
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement