@Test
public void testAddPause() {

    CompletableFuture<Boolean> future1 = new CompletableFuture<>();
    CompletableFuture<Boolean> future2 = new CompletableFuture<>();
    scenario.appendRunnable(productionSite -> future1.complete(Boolean.TRUE));
    scenario.addPause(500);
    scenario.appendRunnable(productionSite -> future2.complete(Boolean.TRUE));
    scenario.setProductionSite(fakeSite);
    scenario.startScenario();
    try {
        assertTrue(future1.get(100, TimeUnit.MILLISECONDS));
        assertFalse(future2.isDone());
        assertTrue(scenario.isRunning());
    } catch (InterruptedException | ExecutionException | TimeoutException ex) {
        fail("CompletableFuture.get() failed: " + ex.getMessage());
    }
    try {
        sleep(300);
    } catch (InterruptedException ex) {
        System.err.println("Sleep failed in ScenarioTest: " + ex.getMessage());
    }
    assertFalse(future2.isDone());
    assertTrue(scenario.isRunning());
    try {
        assertTrue(future2.get(300, TimeUnit.MILLISECONDS));
        sleep(50);
        assertFalse(scenario.isRunning());
    } catch (InterruptedException | ExecutionException | TimeoutException ex) {
        fail("CompletableFuture.get() failed: " + ex.getMessage());
    }
}