Extract some methods for use by other test cases