The various tests seem to be taking on a common structure. If it's possible, you should try to factor out the common parts into something reusable across all of the tests. However, be careful to keep things readable, and avoiding any cross dependencies between the tests.