chore(agent): centralize NewJob/NewUnit invocations in agent test