public <T> void notifyReadyAsync(Callable<T> callable, BiConsumer<T, Throwable> handler) {
        workerExecutor.execute(
                () -> {
                    try {
                        T result = callable.call();
                        executorToNotify.execute(() -> handler.accept(result, null));
                    } catch (Throwable t) {
                        executorToNotify.execute(() -> handler.accept(null, t));
                    }
                });
    }
@Test
    public void testExceptionInCallable() {
        Exception exception = new Exception("Expected exception.");
        notifier.notifyReadyAsync(
                () -> {
                    throw exception;
                },
                (v, e) -> {
                    assertEquals(exception, e);
                    assertNull(v);
                });
    }