@Test
public void testWaitUntilComplete_failed() throws Exception {

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