]> source.dussan.org Git - archiva.git/blob
1ba94877ccd98dc7deeea80e86ec3381a9c686ba
[archiva.git] /
1 package org.apache.archiva.web.xmlrpc.services;
2
3 /*
4  * Licensed to the Apache Software Foundation (ASF) under one
5  * or more contributor license agreements.  See the NOTICE file
6  * distributed with this work for additional information
7  * regarding copyright ownership.  The ASF licenses this file
8  * to you under the Apache License, Version 2.0 (the
9  * "License"); you may not use this file except in compliance
10  * with the License.  You may obtain a copy of the License at
11  *
12  *   http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing,
15  * software distributed under the License is distributed on an
16  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17  * KIND, either express or implied.  See the License for the
18  * specific language governing permissions and limitations
19  * under the License.
20  */
21
22
23 import java.util.ArrayList;
24 import java.util.Arrays;
25 import java.util.Collections;
26 import java.util.Date;
27 import java.util.List;
28
29 import org.apache.archiva.indexer.search.RepositorySearch;
30 import org.apache.archiva.indexer.search.SearchResultHit;
31 import org.apache.archiva.indexer.search.SearchResultLimits;
32 import org.apache.archiva.indexer.search.SearchResults;
33 import org.apache.archiva.indexer.util.SearchUtil;
34 import org.apache.archiva.metadata.model.ProjectVersionMetadata;
35 import org.apache.archiva.metadata.model.ProjectVersionReference;
36 import org.apache.archiva.metadata.repository.MetadataResolver;
37 import org.apache.archiva.metadata.repository.storage.maven2.MavenProjectFacet;
38 import org.apache.archiva.web.xmlrpc.api.SearchService;
39 import org.apache.archiva.web.xmlrpc.api.beans.Artifact;
40 import org.apache.archiva.web.xmlrpc.api.beans.Dependency;
41 import org.apache.archiva.web.xmlrpc.security.XmlRpcUserRepositories;
42 import org.apache.maven.archiva.database.ArchivaDAO;
43 import org.apache.maven.archiva.database.ArtifactDAO;
44 import org.apache.maven.archiva.database.constraints.ArtifactsByChecksumConstraint;
45 import org.apache.maven.archiva.database.constraints.UniqueVersionConstraint;
46 import org.apache.maven.archiva.model.ArchivaArtifact;
47 import org.apache.maven.archiva.model.ArchivaProjectModel;
48 import org.codehaus.plexus.spring.PlexusInSpringTestCase;
49 import org.easymock.MockControl;
50 import org.easymock.classextension.MockClassControl;
51
52 /**
53  * SearchServiceImplTest
54  *
55  * @version $Id: SearchServiceImplTest.java
56  */
57 public class SearchServiceImplTest
58     extends PlexusInSpringTestCase
59 {
60     private SearchService searchService;
61
62     private MockControl userReposControl;
63
64     private XmlRpcUserRepositories userRepos;
65
66     private MockControl searchControl;
67
68     private RepositorySearch search;
69
70     private MockControl archivaDAOControl;
71
72     private ArchivaDAO archivaDAO;
73
74     private MockControl artifactDAOControl;
75
76     private ArtifactDAO artifactDAO;
77
78     private static final String ARCHIVA_TEST_ARTIFACT_ID = "archiva-xmlrpc-test";
79
80     private static final String ARCHIVA_TEST_GROUP_ID = "org.apache.archiva";
81
82     private MockControl metadataResolverControl;
83
84     private MetadataResolver metadataResolver;
85
86     @Override
87     public void setUp()
88         throws Exception
89     {
90         userReposControl = MockClassControl.createControl( XmlRpcUserRepositories.class );
91         userRepos = (XmlRpcUserRepositories) userReposControl.getMock();
92
93         archivaDAOControl = MockControl.createControl( ArchivaDAO.class );
94         archivaDAOControl.setDefaultMatcher( MockControl.ALWAYS_MATCHER );
95         archivaDAO = (ArchivaDAO) archivaDAOControl.getMock();
96
97         searchControl = MockControl.createControl( RepositorySearch.class );
98         searchControl.setDefaultMatcher( MockControl.ALWAYS_MATCHER );
99         search = (RepositorySearch) searchControl.getMock();
100
101         metadataResolverControl = MockControl.createControl( MetadataResolver.class );
102         metadataResolver = (MetadataResolver) metadataResolverControl.getMock();
103
104         artifactDAOControl = MockControl.createControl( ArtifactDAO.class );
105         artifactDAO = (ArtifactDAO) artifactDAOControl.getMock();
106
107         searchService = new SearchServiceImpl( userRepos, archivaDAO, metadataResolver, search );
108     }
109
110     // MRM-1230
111     public void testQuickSearchModelPackagingIsUsed()
112         throws Exception
113     {
114         List<String> observableRepoIds = new ArrayList<String>();
115         observableRepoIds.add( "repo1.mirror" );
116         observableRepoIds.add( "public.releases" );
117
118         userReposControl.expectAndReturn( userRepos.getObservableRepositories(), observableRepoIds );
119
120         SearchResults results = new SearchResults();
121         List<String> versions = new ArrayList<String>();
122         versions.add( "1.0" );
123
124         SearchResultHit resultHit = new SearchResultHit();
125         resultHit.setGroupId( ARCHIVA_TEST_GROUP_ID );
126         resultHit.setArtifactId( "archiva-webapp" );
127         resultHit.setVersions( versions );
128         resultHit.setRepositoryId( null );
129
130         results.addHit( SearchUtil.getHitId( ARCHIVA_TEST_GROUP_ID, "archiva-webapp" ), resultHit );
131
132         SearchResultLimits limits = new SearchResultLimits( SearchResultLimits.ALL_PAGES );
133
134         searchControl.expectAndDefaultReturn( search.search( "", observableRepoIds, "archiva", limits, null ),
135                                               results );
136
137         archivaDAOControl.expectAndReturn( archivaDAO.query(
138             new UniqueVersionConstraint( observableRepoIds, resultHit.getGroupId(), resultHit.getArtifactId() ) ),
139                                            null );
140
141         ProjectVersionMetadata model = new ProjectVersionMetadata();
142         model.setId( "1.0" );
143         MavenProjectFacet facet = new MavenProjectFacet();
144         facet.setPackaging( "war" );
145         model.addFacet( facet );
146
147         metadataResolverControl.expectAndReturn(
148             metadataResolver.getProjectVersion( "repo1.mirror", ARCHIVA_TEST_GROUP_ID, "archiva-webapp", "1.0" ),
149             model );
150
151         userReposControl.replay();
152         searchControl.replay();
153         metadataResolverControl.replay();
154         archivaDAOControl.replay();
155
156         List<Artifact> artifacts = searchService.quickSearch( "archiva" );
157
158         userReposControl.verify();
159         searchControl.verify();
160         metadataResolverControl.verify();
161         archivaDAOControl.verify();
162
163         assertNotNull( artifacts );
164         assertEquals( 1, artifacts.size() );
165
166         Artifact artifact = artifacts.get( 0 );
167         assertEquals( ARCHIVA_TEST_GROUP_ID, artifact.getGroupId() );
168         assertEquals( "archiva-webapp", artifact.getArtifactId() );
169         assertEquals( "1.0", artifact.getVersion() );
170         assertEquals( "war", artifact.getType() );
171         assertNotNull( "Repository should not be null!", artifact.getRepositoryId() );
172         assertEquals( "repo1.mirror", artifact.getRepositoryId() );
173     }
174
175     public void testQuickSearchDefaultPackagingIsUsed()
176         throws Exception
177     {
178         List<String> observableRepoIds = new ArrayList<String>();
179         observableRepoIds.add( "repo1.mirror" );
180         observableRepoIds.add( "public.releases" );
181
182         userReposControl.expectAndReturn( userRepos.getObservableRepositories(), observableRepoIds );
183
184         SearchResults results = new SearchResults();
185         List<String> versions = new ArrayList<String>();
186         versions.add( "1.0" );
187
188         SearchResultHit resultHit = new SearchResultHit();
189         resultHit.setRepositoryId( null );
190         resultHit.setGroupId( ARCHIVA_TEST_GROUP_ID );
191         resultHit.setArtifactId( ARCHIVA_TEST_ARTIFACT_ID );
192         resultHit.setVersions( versions );
193
194         results.addHit( SearchUtil.getHitId( ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID ), resultHit );
195
196         SearchResultLimits limits = new SearchResultLimits( SearchResultLimits.ALL_PAGES );
197
198         searchControl.expectAndDefaultReturn( search.search( "", observableRepoIds, "archiva", limits, null ),
199                                               results );
200
201         archivaDAOControl.expectAndReturn( archivaDAO.query(
202             new UniqueVersionConstraint( observableRepoIds, resultHit.getGroupId(), resultHit.getArtifactId() ) ),
203                                            null );
204
205         metadataResolverControl.expectAndReturn(
206             metadataResolver.getProjectVersion( "repo1.mirror", ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID,
207                                                 "1.0" ), null );
208
209         ProjectVersionMetadata model = new ProjectVersionMetadata();
210         model.setId( "1.0" );
211         metadataResolverControl.expectAndReturn(
212             metadataResolver.getProjectVersion( "public.releases", ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID,
213                                                 "1.0" ), model );
214
215         userReposControl.replay();
216         searchControl.replay();
217         metadataResolverControl.replay();
218         archivaDAOControl.replay();
219
220         List<Artifact> artifacts = searchService.quickSearch( "archiva" );
221
222         userReposControl.verify();
223         searchControl.verify();
224         metadataResolverControl.verify();
225         archivaDAOControl.verify();
226
227         assertNotNull( artifacts );
228         assertEquals( 1, artifacts.size() );
229
230         Artifact artifact = artifacts.get( 0 );
231         assertEquals( ARCHIVA_TEST_GROUP_ID, artifact.getGroupId() );
232         assertEquals( ARCHIVA_TEST_ARTIFACT_ID, artifact.getArtifactId() );
233         assertEquals( "1.0", artifact.getVersion() );
234         assertEquals( "jar", artifact.getType() );
235         assertEquals( "public.releases", artifact.getRepositoryId() );
236     }
237
238     public void testQuickSearchArtifactRegularSearch()
239         throws Exception
240     {
241         List<String> observableRepoIds = new ArrayList<String>();
242         observableRepoIds.add( "repo1.mirror" );
243         observableRepoIds.add( "public.releases" );
244
245         userReposControl.expectAndReturn( userRepos.getObservableRepositories(), observableRepoIds );
246
247         SearchResults results = new SearchResults();
248         List<String> versions = new ArrayList<String>();
249         versions.add( "1.0" );
250
251         SearchResultHit resultHit = new SearchResultHit();
252         resultHit.setGroupId( ARCHIVA_TEST_GROUP_ID );
253         resultHit.setArtifactId( ARCHIVA_TEST_ARTIFACT_ID );
254         resultHit.setVersions( versions );
255         resultHit.setRepositoryId( null );
256
257         results.addHit( SearchUtil.getHitId( resultHit.getGroupId(), resultHit.getArtifactId() ), resultHit );
258
259         archivaDAOControl.expectAndReturn( archivaDAO.query(
260             new UniqueVersionConstraint( observableRepoIds, resultHit.getGroupId(), resultHit.getArtifactId() ) ),
261                                            null );
262
263         SearchResultLimits limits = new SearchResultLimits( SearchResultLimits.ALL_PAGES );
264
265         searchControl.expectAndDefaultReturn( search.search( "", observableRepoIds, "archiva", limits, null ),
266                                               results );
267
268         ProjectVersionMetadata model = new ProjectVersionMetadata();
269         model.setId( "1.0" );
270         MavenProjectFacet facet = new MavenProjectFacet();
271         facet.setPackaging( "jar" );
272         model.addFacet( facet );
273
274         metadataResolverControl.expectAndReturn(
275             metadataResolver.getProjectVersion( "repo1.mirror", ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID,
276                                                 "1.0" ), model );
277
278         userReposControl.replay();
279         searchControl.replay();
280         archivaDAOControl.replay();
281         metadataResolverControl.replay();
282
283         List<Artifact> artifacts = searchService.quickSearch( "archiva" );
284
285         userReposControl.verify();
286         searchControl.verify();
287         archivaDAOControl.verify();
288         metadataResolverControl.verify();
289
290         assertNotNull( artifacts );
291         assertEquals( 1, artifacts.size() );
292
293         Artifact artifact = artifacts.get( 0 );
294         assertEquals( ARCHIVA_TEST_GROUP_ID, artifact.getGroupId() );
295         assertEquals( ARCHIVA_TEST_ARTIFACT_ID, artifact.getArtifactId() );
296         assertEquals( "1.0", artifact.getVersion() );
297         assertEquals( "jar", artifact.getType() );
298         assertNotNull( "Repository should not be null!", artifact.getRepositoryId() );
299         assertEquals( "repo1.mirror", artifact.getRepositoryId() );
300     }
301
302     public void testQuickSearchNoResults()
303         throws Exception
304     {
305         List<String> observableRepoIds = new ArrayList<String>();
306         observableRepoIds.add( "repo1.mirror" );
307         observableRepoIds.add( "public.releases" );
308
309         userReposControl.expectAndReturn( userRepos.getObservableRepositories(), observableRepoIds );
310
311         SearchResults results = new SearchResults();
312         SearchResultLimits limits = new SearchResultLimits( SearchResultLimits.ALL_PAGES );
313
314         searchControl.expectAndDefaultReturn( search.search( "", observableRepoIds, "non-existent", limits, null ),
315                                               results );
316         userReposControl.replay();
317         searchControl.replay();
318
319         List<Artifact> artifacts = searchService.quickSearch( "test" );
320
321         userReposControl.verify();
322         searchControl.verify();
323
324         assertNotNull( artifacts );
325         assertEquals( 0, artifacts.size() );
326     }
327
328     public void testGetArtifactByChecksum()
329         throws Exception
330     {
331         Date whenGathered = new Date();
332
333         ArtifactsByChecksumConstraint constraint = new ArtifactsByChecksumConstraint( "a1b2c3aksjhdasfkdasasd" );
334         List<ArchivaArtifact> artifacts = new ArrayList<ArchivaArtifact>();
335         ArchivaArtifact artifact =
336             new ArchivaArtifact( ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID, "1.0", "", "jar", "test-repo" );
337         artifact.getModel().setWhenGathered( whenGathered );
338         artifacts.add( artifact );
339
340         archivaDAOControl.expectAndReturn( archivaDAO.getArtifactDAO(), artifactDAO );
341         artifactDAO.queryArtifacts( constraint );
342         artifactDAOControl.setMatcher( MockControl.ALWAYS_MATCHER );
343         artifactDAOControl.setReturnValue( artifacts );
344
345         archivaDAOControl.replay();
346         artifactDAOControl.replay();
347
348         List<Artifact> results = searchService.getArtifactByChecksum( "a1b2c3aksjhdasfkdasasd" );
349
350         archivaDAOControl.verify();
351         artifactDAOControl.verify();
352
353         assertNotNull( results );
354         assertEquals( 1, results.size() );
355     }
356
357     public void testGetArtifactVersionsArtifactExists()
358         throws Exception
359     {
360         List<String> observableRepoIds = new ArrayList<String>();
361         observableRepoIds.add( "repo1.mirror" );
362         observableRepoIds.add( "public.releases" );
363
364         userReposControl.expectAndReturn( userRepos.getObservableRepositories(), observableRepoIds );
365         metadataResolverControl.expectAndReturn(
366             metadataResolver.getProjectVersions( "repo1.mirror", ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID ),
367             Arrays.asList( "1.0", "1.1-beta-2", "1.2" ) );
368         metadataResolverControl.expectAndReturn(
369             metadataResolver.getProjectVersions( "public.releases", ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID ),
370             Arrays.asList( "1.1-beta-1", "1.1", "1.2.1-SNAPSHOT" ) );
371
372         userReposControl.replay();
373         metadataResolverControl.replay();
374
375         List<Artifact> artifacts = searchService.getArtifactVersions( ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID );
376
377         userReposControl.verify();
378         metadataResolverControl.verify();
379
380         assertNotNull( artifacts );
381         assertEquals( 6, artifacts.size() );
382         assertEquals( new Artifact( "repo1.mirror", ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID, "1.0", "pom" ),
383                       artifacts.get( 0 ) );
384         assertEquals(
385             new Artifact( "public.releases", ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID, "1.1-beta-1", "pom" ),
386             artifacts.get( 3 ) );
387         assertEquals(
388             new Artifact( "repo1.mirror", ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID, "1.1-beta-2", "pom" ),
389             artifacts.get( 1 ) );
390         assertEquals( new Artifact( "public.releases", ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID, "1.1", "pom" ),
391                       artifacts.get( 4 ) );
392         assertEquals( new Artifact( "repo1.mirror", ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID, "1.2", "pom" ),
393                       artifacts.get( 2 ) );
394         assertEquals(
395             new Artifact( "public.releases", ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID, "1.2.1-SNAPSHOT", "pom" ),
396             artifacts.get( 5 ) );
397     }
398
399     public void testGetArtifactVersionsByDateArtifactExists()
400         throws Exception
401     {
402         // TODO
403     }
404
405     public void testGetArtifactVersionsByDateArtifactDoesNotExist()
406         throws Exception
407     {
408         // TODO
409     }
410
411     public void testGetDependenciesArtifactExists()
412         throws Exception
413     {
414         String repoId = "repo1.mirror";
415
416         ProjectVersionMetadata model = new ProjectVersionMetadata();
417         model.setId( "1.0" );
418
419         org.apache.archiva.metadata.model.Dependency dependency = new org.apache.archiva.metadata.model.Dependency();
420         dependency.setGroupId( "org.apache.commons" );
421         dependency.setArtifactId( "commons-logging" );
422         dependency.setVersion( "2.0" );
423
424         model.addDependency( dependency );
425
426         dependency = new org.apache.archiva.metadata.model.Dependency();
427         dependency.setGroupId( "junit" );
428         dependency.setArtifactId( "junit" );
429         dependency.setVersion( "2.4" );
430         dependency.setScope( "test" );
431
432         model.addDependency( dependency );
433
434         userReposControl.expectAndReturn( userRepos.getObservableRepositories(), Collections.singletonList( repoId ) );
435         metadataResolverControl.expectAndReturn(
436             metadataResolver.getProjectVersion( repoId, ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID, "1.0" ),
437             model );
438
439         metadataResolverControl.replay();
440         userReposControl.replay();
441
442         List<Dependency> dependencies =
443             searchService.getDependencies( ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID, "1.0" );
444
445         metadataResolverControl.verify();
446         userReposControl.verify();
447
448         assertNotNull( dependencies );
449         assertEquals( 2, dependencies.size() );
450         assertEquals( new Dependency( "org.apache.commons", "commons-logging", "2.0", null, null, null ),
451                       dependencies.get( 0 ) );
452         assertEquals( new Dependency( "junit", "junit", "2.4", null, null, "test" ), dependencies.get( 1 ) );
453     }
454
455     public void testGetDependenciesArtifactDoesNotExist()
456         throws Exception
457     {
458         String repoId = "repo1.mirror";
459
460         userReposControl.expectAndReturn( userRepos.getObservableRepositories(), Collections.singletonList( repoId ) );
461         metadataResolverControl.expectAndReturn(
462             metadataResolver.getProjectVersion( repoId, ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID, "1.0" ),
463             null );
464
465         userReposControl.replay();
466         metadataResolverControl.replay();
467
468         try
469         {
470             searchService.getDependencies( ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID, "1.0" );
471             fail( "An exception should have been thrown." );
472         }
473         catch ( Exception e )
474         {
475             assertEquals( "Artifact does not exist.", e.getMessage() );
476         }
477
478         userReposControl.verify();
479         metadataResolverControl.verify();
480     }
481
482     public void testGetDependencyTreeArtifactExists()
483         throws Exception
484     {
485         // TODO
486     }
487
488     public void testGetDependencyTreeArtifactDoesNotExist()
489         throws Exception
490     {
491         // TODO
492     }
493
494     public void testGetDependees()
495         throws Exception
496     {
497         List<String> observableRepoIds = new ArrayList<String>();
498         String repoId = "repo1.mirror";
499         observableRepoIds.add( repoId );
500
501         List<ProjectVersionReference> dependeeModels = new ArrayList<ProjectVersionReference>();
502         ProjectVersionReference dependeeModel = new ProjectVersionReference();
503         dependeeModel.setNamespace( ARCHIVA_TEST_GROUP_ID );
504         dependeeModel.setProjectId( "archiva-dependee-one" );
505         dependeeModel.setProjectVersion( "1.0" );
506         dependeeModels.add( dependeeModel );
507
508         dependeeModel = new ProjectVersionReference();
509         dependeeModel.setNamespace( ARCHIVA_TEST_GROUP_ID );
510         dependeeModel.setProjectId( "archiva-dependee-two" );
511         dependeeModel.setProjectVersion( "1.0" );
512         dependeeModels.add( dependeeModel );
513
514         userReposControl.expectAndReturn( userRepos.getObservableRepositories(), observableRepoIds );
515         metadataResolverControl.expectAndReturn(
516             metadataResolver.getProjectReferences( repoId, ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID, "1.0" ),
517             dependeeModels );
518
519         metadataResolverControl.replay();
520         userReposControl.replay();
521
522         List<Artifact> dependees = searchService.getDependees( ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID, "1.0" );
523
524         metadataResolverControl.verify();
525         userReposControl.verify();
526
527         assertNotNull( dependees );
528         assertEquals( 2, dependees.size() );
529         assertEquals( new Artifact( repoId, ARCHIVA_TEST_GROUP_ID, "archiva-dependee-one", "1.0", "" ),
530                       dependees.get( 0 ) );
531         assertEquals( new Artifact( repoId, ARCHIVA_TEST_GROUP_ID, "archiva-dependee-two", "1.0", "" ),
532                       dependees.get( 1 ) );
533     }
534
535     public void testGetDependeesArtifactDoesNotExist()
536         throws Exception
537     {
538         List<String> observableRepoIds = new ArrayList<String>();
539         observableRepoIds.add( "repo1.mirror" );
540         observableRepoIds.add( "public.releases" );
541
542         // no longer differentiating between a project not being present and a project that is present but with
543         // no references. If it is later determined to be needed, we will need to modify the metadata content repository
544         userReposControl.expectAndReturn( userRepos.getObservableRepositories(), observableRepoIds );
545         metadataResolverControl.expectAndReturn(
546             metadataResolver.getProjectReferences( "repo1.mirror", ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID,
547                                                    "1.0" ), Collections.<ProjectVersionReference>emptyList() );
548         metadataResolverControl.expectAndReturn(
549             metadataResolver.getProjectReferences( "public.releases", ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID,
550                                                    "1.0" ), Collections.<ProjectVersionReference>emptyList() );
551
552         userReposControl.replay();
553         metadataResolverControl.replay();
554
555         assertTrue( searchService.getDependees( ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID, "1.0" ).isEmpty() );
556     }
557 }