Patch for test

This patches improve tests.
These are not necessary soon but would be needed when we bump core to later versions.
The ```Setup``` class is in the ```mock``` package, so I think that package is a better fit.