Factor out test functions from jobs model.