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