Split code for part 3 into two separate test cases.