I have a code which has below two new List objects of different type:
List<TypeOne> typeOneList = new ArrayList<TypeOne>();
List<TypeTwo> typeTwoList = new ArrayList<TypeTwo>();
How can I use PowerMock.expectNew() to return two different ArrayList objects? Like..
PowerMock.expectNew(ArrayList.class).andReturn(typeOneList);
PowerMock.expectNew(ArrayList.class).andReturn(typeTwoList);
How we can differentiate in the above statement as for which statement the objects corresponds to?
thanks!