### Question:
DefaultTask extends Task<V> { @Override public V getUninterruptedly() { return 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 void testTaskSupply() { Task<Boolean> task = Task.supply(() -> Boolean.TRUE); Boolean b = task.getUninterruptedly(); Assertions.assertNotNull(b); Assertions.assertTrue(b); }
@Test void testCompletedTask() { Task<Boolean> task = Task.completedTask(true); Boolean b = task.getUninterruptedly(); Assertions.assertNotNull(b); Assertions.assertTrue(b); }
@Test void testGetUninterruptedly() { Task<Boolean> task = new DefaultTask<>(); long start = System.currentTimeMillis(); Boolean result = task.getUninterruptedly(TimeUnit.SECONDS, 3); long end = System.currentTimeMillis(); Assertions.assertTrue(this.between(end, start + 3000, start + 3100)); Assertions.assertNull(result); }