health storage: refactor common code for test

Test: pass
Bug: 177470478
Change-Id: I7be46664df08fd600143ca018885c64030e8d6a1
4 files changed