Create a list of shuffled attributes when some of them are multiple such as:
sort the list by both orders:
ID and name.
The list will be sorted only by the last field
attached are junit path file to show the bug, and a fix (there is also a junit that shows the fix is wrong)
watch out that in the Junit test patch the test is called "testFailMultipleOrderings" and it will path only because i am using there "assertNotSame"
the fix is :
The OrderExitOperation class should hod a list of properties to sort by
and then the comparator should iterate over all the properties by their insert order
the comparator algorithm:
if the object are identical return 0;
else compare the properties
if the properties comparison returns 0 go to next property
else return the comparison
(the comparison should be multiplied by -1 in cases of descending order.)
I am also attaching a test to show this error, and its fix