Refactoring tests

Collaboratively

Change-Id: I6c5417a0681f9bb8596c36600a569df2ddd7bf9e