title: How to mock ResultSet methods next() and getString() using JMockit?
body: <p>I am currently using a invocation class to implement my current test requirements however these will get very messy as more conditions need to be added, Does anyone know a better solution with some examples? 
  @Rogério</p>
  
  <pre><code>@Mock
          boolean next(Invocation in) {
  
              logger.info("invocation count" + in.getInvocationCount());
  
              if (in.getInvocationCount() % 2 == 0 &amp;&amp; in.getInvocationCount() != 1) {
                  logger.info("from resultset" + in.getInvocationCount());
                  return false;
              }
              return true;
          }
  </code></pre>