Advertisement
Guest User

Untitled

a guest
Aug 29th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. @Test(expected = IllegalArgumentException.class)
  2. public void exceptionTesting() {
  3. try {
  4. throw new IllegalArgumentException("id must not be null");
  5. }
  6. catch(IllegalArgumentException iae) {
  7. assertEquals("id must not be null", iae.getMessage());
  8. throw iae;
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement