@Override
    public void handleEventException(Throwable ex, long sequence, Object event) {
        String eventStr;
        try {
            eventStr = event.toString();
        } catch (Exception e) {
            eventStr = "<invalid>";
        }
        logger.warn("Unable to process event " + eventStr + ", sequence " + sequence, ex);
    }
@Test
    public void testHandleEventException() throws Exception {
        final Logger logger = mock(Logger.class);
        final LoggingExceptionHandler handler = new LoggingExceptionHandler(logger);
        handler.handleEventException(new RuntimeException(), -1, null);
        handler.handleEventException(new RuntimeException(), -1, new Object() {
            @Override
            public String toString() {
                throw new NullPointerException();
            }
        });
    }