@Test
public void testWithException() {

    Exception exception = new DummyExceptions.DummyException1();
    Future<Integer> future = Futures.withException(exception);
    try {
        future.await();
        fail("Exception should have been thrown");
    } catch (DummyExceptions.DummyException1 dex1){
        assertEquals(exception, dex1);
    } catch (Exception ex){
        fail("Should have got a DummyException1");
    }
}