title: Difference between EasyMock.expect(...).times(...) versus using EasyMock.expect(...) several times?
body: <p>What is the difference between this:</p>
  
  <pre><code>ResultSet set = EasyMock.createNiceMock(ResultSet.class);
  EasyMock.expect(set.getInt("col1")).andReturn(1);
  EasyMock.expect(set.wasNull()).andReturn(false);
  EasyMock.expect(set.getInt("col2")).andReturn(2);
  EasyMock.expect(set.wasNull()).andReturn(false);
  EasyMock.replay(set);
  
  assertEquals(1, set.getInt("col1"));
  assertEquals(false, set.wasNull());
  assertEquals(2, set.getInt("col2"));
  assertEquals(false, set.wasNull());
  </code></pre>
  
  <p>And this:</p>
  
  <pre><code>ResultSet set = EasyMock.createNiceMock(ResultSet.class);
  EasyMock.expect(set.getInt("col1")).andReturn(1);
  EasyMock.expect(set.getInt("col2")).andReturn(2);
  EasyMock.expect(set.wasNull()).andReturn(false).times(2);
  EasyMock.replay(set);
  
  assertEquals(1, set.getInt("col1"));
  assertEquals(false, set.wasNull());
  assertEquals(2, set.getInt("col2"));
  assertEquals(false, set.wasNull());
  </code></pre>
  
  <p>?</p>
  
  <p>Note: both sets of code compile and run successfully as jUnit tests. Also, note that the use of a "nice" mock is on purpose here.</p>