selectedRepos.add( "snapshots" );
SearchResultLimits limits = new SearchResultLimits( action.getCurrentPage() );
limits.setPageSize( 30 );
SearchResultHit hit = new SearchResultHit();
hit.setGroupId( "org.apache.archiva" );
hit.setArtifactId( "archiva-configuration" );
hit.setUrl( "url" );
hit.addVersion( "1.0" );
hit.addVersion( "1.1" );
SearchResults results = new SearchResults();
results.setLimits( limits );
results.setTotalHits( 1 );
results.addHit( SearchUtil.getHitId( "org.apache.archiva", "archiva-configuration" ), hit );
List<String> versions = new ArrayList<String>();
versions.add( "1.0" );
versions.add( "1.1" );
userReposControl.expectAndReturn( userRepos.getObservableRepositoryIds( "user" ), selectedRepos, 2 );
searchControl.expectAndReturn( search.search( "user", selectedRepos, "archiva", limits, parsed ), results );
daoControl.expectAndReturn( dao.query( new UniqueVersionConstraint( selectedRepos, hit.getGroupId(), hit.getArtifactId() ) ), versions );
userReposControl.replay();
searchControl.replay();
daoControl.replay();