Refactor test utils into separate header
Fix wrong test