@Test
public void testWaitUntilCompleteWithDuration_failed() throws Exception {

    try {
        new ParallelJobsFuture(failedJobFutures(3))
            .waitUntilComplete(Duration.of(10, MINUTES));
        fail("Parallel future must throw exception");
    } catch (JobFailedException ex) {
        assertEquals(ex.getSubExceptions().size(), 3);
    }
}