Refactor ULS tests to reduce duplication and repetition

Change-Id: I96f1594f1b4d1960da9a8bc21e2a5c4727497b10
Merge "Refactor ULS tests to reduce duplication and repetition"