### Question:
DefaultTask extends Task<V> { @Override public void awaitUninterruptedly() { this.get(); }  @Override V get(long timeout, TimeUnit unit); @Override V get(); @Override void awaitUninterruptedly(); @Override void awaitUninterruptedly(@NotNull TimeUnit timeUnit, long time); @Override V getUninterruptedly(); @Override V getUninterruptedly(TimeUnit timeUnit, long time); @NotNull @Override Task<V> onFailure(@NotNull Consumer<TaskCompletionException> consumer); @Override @NotNull Task<U> thenSupply(@NotNull Function<V, U> function); @Override boolean completeExceptionally(Throwable ex);  }### Answer:
@Test @Timeout(5) void testFutureListenerSuccess() { Task<Boolean> task = new DefaultTask<>(); task.onComplete(result -> { Assertions.assertNotNull(result); Assertions.assertTrue(result); }); new Thread(() -> { try { Thread.sleep(3000); task.complete(true); } catch (InterruptedException exception) { Assertions.fail(); } }).start(); task.awaitUninterruptedly(); Assertions.assertTrue(task.isDone()); Assertions.assertFalse(task.isCompletedExceptionally()); }