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