Cleanup unit testing dependencies

This removes having the same list of dependencies 4 times (DRY).