Fixing and rearranging test cases