little refactor in tests