How to compare two list based on elements it contains?
问题 In my unit test class, I am having two list. One is the expectedValue and other is returnedType . I am doing Collections.sort(expected); Collections.sort(returned); but how do I compare two list based on the type of value of one of its element? For example I have element sortOrder in both the list and it has values from 1,2 or 3 so how do i compare or say doing something like assertEqual(expected, returned) for both the list and make sure that both list has same elements and has same