Fix battery unit test compilation.