LPS-48729 Merge identical code into a base test class