this is copying the JobTest. Can we not share code here?

Also, the original job test used mutable val and vars for no real reason. It should have just used a case class, immutable data structures and `.copy(sources = newSrc :: sources)` for instance.  Can we add a TODO here to remove the mutation and return a new instance, not this.type?  Doing this for JobTest would change the type signature, so maybe we should not do that there right away (but add a TODO in any case).