libsnapshot: tests uses common MapUpdateSnapshot/WriteSnapshotAndHash

Factor out duplicated code.
Test: run it

Change-Id: I8c5ab552b97837b0e37cada6263eeda23f7f71b4
1 file changed