Valve test refactoring and merging with authenticator tests

Merging of common parts between global valve tests and global authenticator configuration via valves.