### Question:
ExecutionList { public void add(Runnable runnable, Executor executor) { if (runnable == null) { throw new NullPointerException("Runnable can not be null!"); } if (executor == null) { logger.info("Executor for listenablefuture is null, will use default executor!"); executor = DEFAULT_EXECUTOR; } synchronized (this) { if (!executed) { runnables = new RunnableExecutorPair(runnable, executor, runnables); return; } } executeListener(runnable, executor); } ExecutionList(); void add(Runnable runnable, Executor executor); void execute();  }### Answer:
@Test public void testAddNullRunnable() { Assertions.assertThrows(NullPointerException.class, () -> this.executionList.add(null, mock(Executor.class))); }