I am writing a test case where I do send a list of Strings to be saved in the database. Then I will retrieve those from database and has to verify that everything is fine.
I have written a
assertNotNull(list)
assertEquals(listSize, response.listSize())
However I want to verify the actual contents are also same. But my assertEquals is failing since the list of strings are not in the same order when they are returned.
How do you verify this type of thing usually?