Refactoring to the partition test cases.