I have below -
List<Long> getEmployeeId(Long deptId, Date joiningDate, List<String> technologies);
I am trying to write a Junit for above method by using EasyMock
EasyMock.expect(empDao.getEmployeeId(EasyMock.anyLong(), EasyMock.anyObject(Date.class),EasyMock.anyObject(List.class))).andReturn(empIdList).anyTimes();
replay(empDao);
but I am getting java.lang.IllegalStateException for EasyMock.expect(..)
I am not sure what I am missing here.
I will need a bit more input. The EasyMock version, the full error and so on. Because when trying the following, it works perfectly.