Improves JobTest code

The partial function code was not usable due to type inference.

Removed repeated code.