After clearing, when adding values to list this is not initializing/emptying the list, however, taking the previous list data.
Groovy code as follows:
--Groovy Test Script:
def list_2 = []
list_2.clear()
log.info list_2
log.info list_2.add("a1") //adding 1st value
log.info list_2.add("z2") //adding 2nd value
log.info list_2.add("x3") //adding 3rd value
log.info list_2.add("d4") //adding 4th value
log.info list_2
log.info list_2.sort()
https://community.smartbear.com/t5/SoapUI-Open-Source/how-does-LIST-work-in-SOAPUI-Groovy/m-p/152923
So here how come both sorted and unsorted list values are same?