I am new in EasyMock, i have a scenario like this:
I create a mock for FolderUtils.ABC(). However, inside the FolderUtils.class, there are many methods that I will use with the ABC() when i run this unitTest. I only want the ABC() return the mock values, otherwise they will run as their normal behavior. How can I do that?
FolderUtils contantsUnderTest = EasyMock.createMock(FolderUtils.class);
EasyMock.expect(contantsUnderTest.ABC(EasyMock.notNull(UserKey.class))).andReturn("123").anyTimes();
ReflectionTestUtils.setField(field, "folderUtils", contantsUnderTest);
field.execute();