Testing and calibrating the battery