### Question:
MvcExceptionHandler implements ExceptionHandler<Exception>, Ordered, DispatcherAware { public boolean handle(Exception exception, ExceptionQueuedEvent event) throws Exception { SpringFacesContext context = SpringFacesContext.getCurrentInstance(); if (context != null) { return handle(exception, context); } return false; }  boolean handle(Exception exception, ExceptionQueuedEvent event); boolean handle(Exception exception, SpringFacesContext context); int getOrder(); void setOrder(int order); void setDispatcher(Dispatcher dispatcher);  }### Answer:
@Test public void shouldNotHandleIfNoSpringFacesContext() throws Exception { SpringFacesContextSetter.setCurrentInstance(null); Exception exception = mock(Exception.class); boolean handled = this.exceptionHandler.handle(exception, this.event); assertThat(handled, is(false)); }
@Test public void shouldNotHandleIfDispatcherReturnsNull() throws Exception { Exception exception = new Exception(); boolean handled = this.exceptionHandler.handle(exception, this.event); assertThat(handled, is(false)); }