Say I have a list of apple "listOfApples".
class apple {
int serial;
int price;
......
}
Multiple apple may have same serial. I have to make sure that all the apples in listOfApples are sorted based on their serial.
More precisely all apples from listOfApples that have serial 0 are in the front of the list.
How can I test listOfApples whether it keep the apple in order or not using junit ?