Add tests for battery module

Good news: they're passed before the blob of commits in the
last half hours, and they're still passing...