@Test
public void testLogHandler() throws ExecutionException, InterruptedException {
final CountDownLatch latch = new CountDownLatch(3);
final Queue<LogThrowable> throwables = new ConcurrentLinkedQueue<LogThrowable>();
LogHandler logHandler = new LogHandler() {
@Override
public void onLog(LogEntry logEntry) {
// Would expect logs from AM and the runnable.
if (logEntry.getMessage().startsWith("Starting runnable " + LogRunnable.class.getSimpleName())) {
latch.countDown();