I run my tests in Spring Tool Suite 4 in debug. (On regular manual test of the code, everything works). In the code I initialize an ArrayList<>.
ArrayList<MyEntity> lst = new ArrayList<MyEntity>()
but the lst variable shows up as null and with the following error message:
Error The method toArray() is undefined for the type Collection___
When I try to edit the logical structure it shows:
Type: Collection(java.util.Collection) Show As: Array[contributed by org.eclipse.jdt.debug]
Preview: return toArray();
This issue only shows up when I try to debug my tests.