Service Interface:
public List<UserAccount> getUserAccounts();
public List<UserAccount> getUserAccounts(ResultsetOptions resultsetOptions, List<SortOption> sortOptions);
Service Implementation:
public List<UserAccount> getUserAccounts() {
return getUserAccounts(null, null);
}
public List<UserAccount> getUserAccounts(ResultsetOptions resultsetOptions, List<SortOption> sortOptions) {
return getUserAccountDAO().getUserAccounts(resultsetOptions, sortOptions);
}
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?