import org.easymock.EasyMock;
import org.easymock.EasyMockSupport;
import org.easymock.Mock;
import org.easymock.TestSubject;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import services.OneDao;
import services.OneService;

import static org.junit.Assert.assertEquals;

@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = OneApplication.class)
public class OneTestWithMock {
    @Autowired
    @TestSubject
    OneService oneService;

    @Autowired
    @Mock
    OneDao oneDao;

    @Test
    public void testOneServiceApplyWithParameter() throws Exception {
        EasyMockSupport.injectMocks(this);
        EasyMock.expect(oneDao.apply(1)).andReturn(10);

        EasyMock.replay(oneDao);

        assertEquals(10, oneService.apply(1));
    }
}

@@ -432,16 +432,60 @@
 rvice;%0A%0A
+import static org.easymock.EasyMock.anyInt;%0A
 import s
@@ -922,17 +922,24 @@
 o.apply(
-1
+anyInt()
 )).andRe

use anyInt() for mock method argument