Nothing much, but today my teammate was checking my PR where I had a unit test that was checking if the expected list does not contain the element. We discussed if the unit test can be improved, for example by checking if expected list, when compared to actual list, is the same.
I thought about utilizing
containsAll() but after some discussion it turned out that I should also cover the order of the items. After some time I found out that I could simply utilize
equals() which does exactly that.
Great topic on SO regarding this issue, and especially the answer:
Answer #1: https://stackoverflow.com/a/1075699
Answer #2: https://stackoverflow.com/a/1075817
That’s all, thanks!