@Test(expected = TaskNotScheduledException.class) public void taskOptionalEmpty() { FutureUtils.wait("Test ok", Optional.empty()); }
public static <T> T wait(String message, Optional<Future<? extends T>> task) { if (task.isPresent()) { return wait(message, task.get()); } else { throw new TaskNotScheduledException(message); } }
FutureUtils { public static <T> T wait(String message, Optional<Future<? extends T>> task) { if (task.isPresent()) { return wait(message, task.get()); } else { throw new TaskNotScheduledException(message); } } }
FutureUtils { public static <T> T wait(String message, Optional<Future<? extends T>> task) { if (task.isPresent()) { return wait(message, task.get()); } else { throw new TaskNotScheduledException(message); } }  }
FutureUtils { public static <T> T wait(String message, Optional<Future<? extends T>> task) { if (task.isPresent()) { return wait(message, task.get()); } else { throw new TaskNotScheduledException(message); } }  static T wait(String message, Optional<Future<? extends T>> task); static T wait(String message, Future<T> task); static T wait(String message, Future<T> task, long seconds); }
FutureUtils { public static <T> T wait(String message, Optional<Future<? extends T>> task) { if (task.isPresent()) { return wait(message, task.get()); } else { throw new TaskNotScheduledException(message); } }  static T wait(String message, Optional<Future<? extends T>> task); static T wait(String message, Future<T> task); static T wait(String message, Future<T> task, long seconds);  }