Valve test refactoring in order to reuse common parts for global valve vs authenticator tests