Add more tests for battery checker code

There is no change on functionality, only refactoring
to allow unit testing.

bug: 138381810
bug: 139440234

Change-Id: Id927c091607d9ea5ea84b6e292d53154ef5171a6
6 files changed