Refactor the SSH agent start / stop code into a shared test helper