StringConsumerExceptionHandler implements ExceptionHandler<StringEvent> { @Override public void handleOnStartException(Throwable ex) { SynchronizingSelfLog.error("AsyncConsumer occurs exception on start", ex); }  @Override void handleEventException(Throwable ex, long sequence, StringEvent event); @Override void handleOnStartException(Throwable ex); @Override void handleOnShutdownException(Throwable ex);  }
@Test public void handleOnStartException() throws IOException, InterruptedException { stringConsumerExceptionHandler.handleOnStartException(new Throwable()); Assert.assertTrue(checkFileContainError()); }