### Question:
BukkitService implements SettingsDependent { public BukkitTask runTaskAsynchronously(Runnable task) { return Bukkit.getScheduler().runTaskAsynchronously(authMe, task); } @Inject  BukkitService(AuthMe authMe, Settings settings); int scheduleSyncDelayedTask(Runnable task); int scheduleSyncDelayedTask(Runnable task, long delay); void scheduleSyncTaskFromOptionallyAsyncTask(Runnable task); BukkitTask runTask(Runnable task); BukkitTask runTaskLater(Runnable task, long delay); void runTaskOptionallyAsync(Runnable task); BukkitTask runTaskAsynchronously(Runnable task); BukkitTask runTaskTimerAsynchronously(Runnable task, long delay, long period); BukkitTask runTaskTimer(BukkitRunnable task, long delay, long period); int broadcastMessage(String message); Player getPlayerExact(String name); OfflinePlayer getOfflinePlayer(String name); Set<OfflinePlayer> getBannedPlayers(); OfflinePlayer[] getOfflinePlayers(); @SuppressWarnings("unchecked") Collection<? extends Player> getOnlinePlayers(); void callEvent(Event event); E createAndCallEvent(Function<Boolean, E> eventSupplier); World getWorld(String name); boolean dispatchCommand(CommandSender sender, String commandLine); boolean dispatchConsoleCommand(String commandLine); @Override void reload(Settings settings); void sendBungeeMessage(byte[] bytes); BanEntry banIp(String ip, String reason, Date expires, String source); Optional<Boolean> isBungeeCordConfiguredForSpigot(); static final int TICKS_PER_SECOND; static final int TICKS_PER_MINUTE; }### Answer:
@Test public void shouldRunTaskAsynchronously() { Runnable task = () -> {}; BukkitTask bukkitTask = mock(BukkitTask.class); given(scheduler.runTaskAsynchronously(authMe, task)).willReturn(bukkitTask); BukkitTask resultingTask = bukkitService.runTaskAsynchronously(task); assertThat(resultingTask, equalTo(bukkitTask)); verify(scheduler, only()).runTaskAsynchronously(authMe, task); }