### Question:
HasPermissionChecker implements DebugSection { @Override public void execute(CommandSender sender, List<String> arguments) { sender.sendMessage(ChatColor.BLUE + "AuthMe permission check"); if (arguments.size() < 2) { sender.sendMessage("Check if a player has permission:"); sender.sendMessage("Example: /authme debug perm bobby my.perm.node"); sender.sendMessage("Permission system type used: " + permissionsManager.getPermissionSystem()); return; } final String playerName = arguments.get(0); final String permissionNode = arguments.get(1); Player player = bukkitService.getPlayerExact(playerName); if (player == null) { OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(playerName); if (offlinePlayer == null) { sender.sendMessage(ChatColor.DARK_RED + "Player '" + playerName + "' does not exist"); } else { sender.sendMessage("Player '" + playerName + "' not online; checking with offline player"); performPermissionCheck(offlinePlayer, permissionNode, permissionsManager::hasPermissionOffline, sender); } } else { performPermissionCheck(player, permissionNode, permissionsManager::hasPermission, sender); } }  @Override String getName(); @Override String getDescription(); @Override void execute(CommandSender sender, List<String> arguments); @Override PermissionNode getRequiredPermission();  }### Answer:
@Test public void shouldShowUsageInfo() { CommandSender sender = mock(CommandSender.class); hasPermissionChecker.execute(sender, emptyList()); ArgumentCaptor<String> msgCaptor = ArgumentCaptor.forClass(String.class); verify(sender, atLeast(2)).sendMessage(msgCaptor.capture()); assertThat( msgCaptor.getAllValues().stream().anyMatch(msg -> msg.contains("/authme debug perm bobby my.perm.node")), equalTo(true)); }