Code example for ParseException

0
    } 
 
    @Test(expected = ParseException.class) 
    public void should_notify_all_listeners_when_called_delegate_handler_throws_exception_and_rethrow_it() throws Throwable { 
        // given 
        ParseException parseException = new ParseException("", 0); 
        given(mockHandler.handle(invocation)).willThrow(parseException); 
 
        // when 
        try { 
            notifier.handle(invocation); 
            fail(); 
        } finally { 
            // then 
            verify(listener1).reportInvocation(new NotifiedMethodInvocationReport(invocation, parseException)); 
            verify(listener2).reportInvocation(new NotifiedMethodInvocationReport(invocation, parseException)); 
        } 
    } 
 
    @Test 
    public void should_report_listener_exception() throws Throwable {