Moved all setup into a function, which can be called from all class setUp() methods.