@GwtIncompatible // withTimeout public void testWithTimeout() throws Exception { ScheduledExecutorService executor = newScheduledThreadPool(1); try { FluentFuture<?> f = SettableFuture.create().withTimeout(0, SECONDS, executor); try { f.get(); fail(); } catch (ExecutionException e) { assertThat(e.getCause()).isInstanceOf(TimeoutException.class); } } finally { executor.shutdown(); } } }