title: EasyMock java.lang.AssertionError: Unexpected method call
body: <p>I am new to EasyMock and am stuck now. 
  Can't I set the fields of mocked object?
  Where am I going wrong? Any help would be really appreciated.</p>
  
  <pre><code>IService service = EasyMock.createMock(IService.class);
  service.setName("abc"); 
  EasyMock.replay(service);
  org.junit.Assert.assertEquals("abc", service.getName());
  EasyMock.verify(service);
  
      java.lang.AssertionError: 
        Unexpected method call getName():
          setName("abc"): expected: 1, actual: 0
          at org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:45)
          at org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:73)
          at org.easymock.internal.ClassProxyFactory$MockMethodInterceptor.intercept(ClassProxyFactory.java:92)
  </code></pre>