title: How to use EasyMock expect
body: <p>The expect doesn't seem to work for me:</p>
  
  <pre><code>    package com.jjs.caf.library.client.drafting;
  
  import static org.junit.Assert.*;
  
  import org.easymock.EasyMock;
  import org.junit.Before;
  import org.junit.Test;
  
  import com.jjs.caf.library.client.CustomerManager;
  import com.jjs.caf.library.client.UserBookLimiter;
  
  public class DraftTest {
  
      UserBookLimiter userBookLimiter;
      int expected = 5;
  
      @Before
      public void setUp() throws Exception {
          userBookLimiter = EasyMock.createMock(UserBookLimiter.class);
          EasyMock.expect(userBookLimiter.getMaxNumberOfBooksAllowed()).andReturn(5);
      }
  
      @Test
      public final void test() {
          assertEquals(expected, userBookLimiter.getMaxNumberOfBooksAllowed());
      }
  
  }
  </code></pre>
  
  <p>It's supposed to be 5, but I'm getting 0 as if the expect wouldn't be there at all...</p>