Solve cyclic references

make local method to setup things that are repeated in multiple tests.
Combining tests are also fine with me if it makes sense.