Move test utilities to common directory, and use them more widely.

Change-Id: Ib7397eccf811fec6a746254a613936c8466ac9e6
24 files changed