title: service layer testing in spring mvc using easymock
body: <p>Service Interface:</p>
  
  <pre><code>public List&lt;UserAccount&gt; getUserAccounts();
  public List&lt;UserAccount&gt; getUserAccounts(ResultsetOptions resultsetOptions, List&lt;SortOption&gt; sortOptions);
  </code></pre>
  
  <p>Service Implementation:</p>
  
  <pre><code>public List&lt;UserAccount&gt; getUserAccounts() {
      return getUserAccounts(null, null);
  }
  public List&lt;UserAccount&gt; getUserAccounts(ResultsetOptions resultsetOptions, List&lt;SortOption&gt; sortOptions) {
      return getUserAccountDAO().getUserAccounts(resultsetOptions, sortOptions);
  }
  </code></pre>
  
  <p>How can I test this using easymock or any other viable testing methodology? sample code will be appreciated. For the easy mock passing objects as parameters very confusing. Some one clearly explain whats the best approach to test the service layer? testing service interface will be considered as unit test or integration test? </p>