fail2ban-testcases: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/fail2ban-testcases - from package: fail2ban

You may install the required package with command yum install {package}
Error in other languages:
fail2ban-testcases: bevel nie gevind nie
fail2ban-testcases: comandă negăsită
fail2ban-testcases: comando não encontrado
fail2ban-testcases: commande introuvable
fail2ban-testcases: command not found
fail2ban-testcases: käsku ei ole
fail2ban-testcases: không tìm thấy lệnh
fail2ban-testcases: komanda nerasta
fail2ban-testcases: Kommando nicht gefunden.
fail2ban-testcases: kommandot finns inte
fail2ban-testcases: komut yok
fail2ban-testcases: nie znaleziono polecenia
fail2ban-testcases: níor aimsíodh an t-ordú
fail2ban-testcases: no se encontró la orden
fail2ban-testcases: no s'ha trobat l'ordre
fail2ban-testcases: opdracht niet gevonden
fail2ban-testcases: parancs nem található
fail2ban-testcases: perintah tidak ditemukan
fail2ban-testcases: príkaz nenájdený
fail2ban-testcases: příkaz nenalezen
fail2ban-testcases: команда не найдена
fail2ban-testcases: командата не е открита
fail2ban-testcases: 命令找不到
fail2ban-testcases: コマンドが見つかりません