Fix TestPatternHopFactory, sort of

This concludes my fixes to the broken tests, at least for now. There are 3 compile errors and 9 failures remaining, which all depend (or seem to depend) on work that Andrew would do, so I'm not touching them until he's finished.