Helper method for these 8 lines? They are also in the previous unit test case.