Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test(expected = IllegalArgumentException.class)
- public void exceptionTesting() {
- try {
- throw new IllegalArgumentException("id must not be null");
- }
- catch(IllegalArgumentException iae) {
- assertEquals("id must not be null", iae.getMessage());
- throw iae;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement