Moved some common code to the setUp and tearDown methods.