Hardware-in-the-Loop Testing for High-Performance Battery Management Systems