With my mocks in place, I get the error:
redisDao.someMethod(notNull(), notNull()): expected 1, actual 0
If I remove the mock setup, then when tracing in debug mode, it goes to the method redisDao.someMethod and then fails with a null pointer exception.
This doesn't make sense to me, and not sure how to fix this?
mockMaker = EasyMock.createStrictControl();
redisDaoMock = mockMaker.createMock(redisDao.class);
userService.setRedisDao(redisDaoMock);
expect(redisDaoMock.someMethod(EasyMock.<String>notNull(), EasyMock.<String>notNull())).andReturn(someReturn);
mockMaker.replay();
mockMaker.verify();
userController.get(request, response);
// assertions here