Move code to real test cases