SearchResults results = new SearchResults();
List<String> versions = new ArrayList<String>();
versions.add( "1.0" );
SearchResultHit resultHit = new SearchResultHit();
resultHit.setRepositoryId( null );
resultHit.setGroupId( ARCHIVA_TEST_GROUP_ID );
resultHit.setArtifactId( ARCHIVA_TEST_ARTIFACT_ID );
resultHit.setVersions( versions );
results.addHit( SearchUtil.getHitId( ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID ), resultHit );
SearchResultLimits limits = new SearchResultLimits( SearchResultLimits.ALL_PAGES );
searchControl.expectAndDefaultReturn( search.search( "", observableRepoIds, "archiva", limits, null ), results );
archivaDAOControl.expectAndReturn( archivaDAO.query( new UniqueVersionConstraint( observableRepoIds, resultHit.getGroupId(),
resultHit.getArtifactId() ) ), null );
repoBrowsingControl.expectAndReturn( repoBrowsing.selectVersion( "", observableRepoIds, ARCHIVA_TEST_GROUP_ID,
ARCHIVA_TEST_ARTIFACT_ID, "1.0" ), null );
repoBrowsingControl.expectAndReturn( repoBrowsing.getRepositoryId( "", observableRepoIds, ARCHIVA_TEST_GROUP_ID,