I'm new to EasyMock JUNIT API,I got a requirement where i need to mock an arraylist in such a way that
1)Initially I need to initialize the list with some values to make sure the application logic trigger based on the List size
2)To exit out of the loop i need to dynamically mock the ArrayList size to 0 To come out of the loop.
Please share your expertise.Appreciate it..
arrayList = MOCKIT(ArrayList); // During here I need to mock some values to the arrayList to pass through the forEach loop
for(Object record : arrayList)
//PROCESS ALL RECORDS
arrayList = MOCKIT(ArrayList);//Here i need to mock the arrayList to 0 to come out of the do while loop.