make test DRY, use Before hook

Change-Id: I6f127e675a3c9e7b6126c0f052dce781d1103b52
Merge "make test DRY, use Before hook"