Refactored ShuffledListBuilder and added test cases