]> source.dussan.org Git - archiva.git/blob
6ee6f874a7f72d88e63d2a5a5edf111eab060fbc
[archiva.git] /
1 package org.apache.maven.archiva.repository.content;
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 import org.apache.commons.lang.StringUtils;
23 import org.apache.maven.archiva.model.ArtifactReference;
24 import org.apache.maven.archiva.repository.AbstractRepositoryLayerTestCase;
25 import org.apache.maven.archiva.repository.ManagedRepositoryContent;
26 import org.apache.maven.archiva.repository.layout.LayoutException;
27
28 import java.io.File;
29
30 /**
31  * RepositoryRequestTest
32  *
33  * @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
34  * @version $Id$
35  */
36 public class RepositoryRequestTest
37     extends AbstractRepositoryLayerTestCase
38 {
39     public void testInvalidRequestNoArtifactId()
40     {
41         assertInvalidRequest( "groupId/jars/-1.0.jar" );
42     }
43
44     public void testInvalidLegacyRequestBadLocation()
45     {
46         assertInvalidRequest( "org.apache.maven.test/jars/artifactId-1.0.war" );
47     }
48
49     public void testInvalidRequestTooShort()
50     {
51         assertInvalidRequest( "org.apache.maven.test/artifactId-2.0.jar" );
52     }
53
54     public void testInvalidDefaultRequestBadLocation()
55     {
56         assertInvalidRequest( "invalid/invalid/1.0-20050611.123456-1/invalid-1.0-20050611.123456-1.jar" );
57     }
58
59     public void testValidLegacyGanymed()
60         throws Exception
61     {
62         assertValid( "ch.ethz.ganymed/jars/ganymed-ssh2-build210.jar", "ch.ethz.ganymed", "ganymed-ssh2", "build210",
63                      null, "jar" );
64     }
65
66     public void testValidDefaultGanymed()
67         throws Exception
68     {
69         assertValid( "ch/ethz/ganymed/ganymed-ssh2/build210/ganymed-ssh2-build210.jar", "ch.ethz.ganymed",
70                      "ganymed-ssh2", "build210", null, "jar" );
71     }
72
73     public void testValidLegacyJavaxComm()
74         throws Exception
75     {
76         assertValid( "javax/jars/comm-3.0-u1.jar", "javax", "comm", "3.0-u1", null, "jar" );
77     }
78
79     public void testValidDefaultJavaxComm()
80         throws Exception
81     {
82         assertValid( "javax/comm/3.0-u1/comm-3.0-u1.jar", "javax", "comm", "3.0-u1", null, "jar" );
83     }
84
85     public void testValidLegacyJavaxPersistence()
86         throws Exception
87     {
88         assertValid( "javax.persistence/jars/ejb-3.0-public_review.jar", "javax.persistence", "ejb",
89                      "3.0-public_review", null, "jar" );
90     }
91
92     public void testValidDefaultJavaxPersistence()
93         throws Exception
94     {
95         assertValid( "javax/persistence/ejb/3.0-public_review/ejb-3.0-public_review.jar", "javax.persistence", "ejb",
96                      "3.0-public_review", null, "jar" );
97     }
98
99     public void testValidLegacyMavenTestPlugin()
100         throws Exception
101     {
102         assertValid( "maven/jars/maven-test-plugin-1.8.2.jar", "maven", "maven-test-plugin", "1.8.2", null, "jar" );
103     }
104
105     public void testValidDefaultMavenTestPlugin()
106         throws Exception
107     {
108         assertValid( "maven/maven-test-plugin/1.8.2/maven-test-plugin-1.8.2.pom", "maven", "maven-test-plugin",
109                      "1.8.2", null, "pom" );
110     }
111
112     public void testValidLegacyCommonsLangJavadoc()
113         throws Exception
114     {
115         assertValid( "commons-lang/javadoc.jars/commons-lang-2.1-javadoc.jar", "commons-lang", "commons-lang", "2.1",
116                      "javadoc", "javadoc" );
117     }
118
119     public void testValidDefaultCommonsLangJavadoc()
120         throws Exception
121     {
122         assertValid( "commons-lang/commons-lang/2.1/commons-lang-2.1-javadoc.jar", "commons-lang", "commons-lang",
123                      "2.1", "javadoc", "javadoc" );
124     }
125
126     public void testValidLegacyDerbyPom()
127         throws Exception
128     {
129         assertValid( "org.apache.derby/poms/derby-10.2.2.0.pom", "org.apache.derby", "derby", "10.2.2.0", null, "pom" );
130         // Starting slash should not prevent detection.
131         assertValid( "/org.apache.derby/poms/derby-10.2.2.0.pom", "org.apache.derby", "derby", "10.2.2.0", null, "pom" );
132     }
133
134     public void testValidDefaultDerbyPom()
135         throws Exception
136     {
137         assertValid( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0.pom", "org.apache.derby", "derby", "10.2.2.0",
138                      null, "pom" );
139     }
140
141     public void testValidLegacyGeronimoEjbSpec()
142         throws Exception
143     {
144         assertValid( "org.apache.geronimo.specs/jars/geronimo-ejb_2.1_spec-1.0.1.jar", "org.apache.geronimo.specs",
145                      "geronimo-ejb_2.1_spec", "1.0.1", null, "jar" );
146     }
147
148     public void testValidDefaultGeronimoEjbSpec()
149         throws Exception
150     {
151         assertValid( "org/apache/geronimo/specs/geronimo-ejb_2.1_spec/1.0.1/geronimo-ejb_2.1_spec-1.0.1.jar",
152                      "org.apache.geronimo.specs", "geronimo-ejb_2.1_spec", "1.0.1", null, "jar" );
153     }
154
155     public void testValidLegacyLdapSnapshot()
156         throws Exception
157     {
158         assertValid( "directory-clients/poms/ldap-clients-0.9.1-SNAPSHOT.pom", "directory-clients", "ldap-clients",
159                      "0.9.1-SNAPSHOT", null, "pom" );
160     }
161
162     public void testValidDefaultLdapSnapshot()
163         throws Exception
164     {
165         assertValid( "directory-clients/ldap-clients/0.9.1-SNAPSHOT/ldap-clients-0.9.1-SNAPSHOT.pom",
166                      "directory-clients", "ldap-clients", "0.9.1-SNAPSHOT", null, "pom" );
167     }
168
169     public void testValidLegacyTestArchSnapshot()
170         throws Exception
171     {
172         assertValid( "test.maven-arch/poms/test-arch-2.0.3-SNAPSHOT.pom", "test.maven-arch", "test-arch",
173                      "2.0.3-SNAPSHOT", null, "pom" );
174     }
175
176     public void testValidDefaultTestArchSnapshot()
177         throws Exception
178     {
179         assertValid( "test/maven-arch/test-arch/2.0.3-SNAPSHOT/test-arch-2.0.3-SNAPSHOT.pom", "test.maven-arch",
180                      "test-arch", "2.0.3-SNAPSHOT", null, "pom" );
181     }
182
183     public void testValidLegacyOddDottedArtifactId()
184         throws Exception
185     {
186         assertValid( "com.company.department/poms/com.company.department.project-0.2.pom", "com.company.department",
187                      "com.company.department.project", "0.2", null, "pom" );
188     }
189
190     public void testValidDefaultOddDottedArtifactId()
191         throws Exception
192     {
193         assertValid( "com/company/department/com.company.department.project/0.2/com.company.department.project-0.2.pom",
194                      "com.company.department", "com.company.department.project", "0.2", null, "pom" );
195     }
196
197     public void testValidLegacyTimestampedSnapshot()
198         throws Exception
199     {
200         assertValid( "org.apache.archiva.test/jars/redonkulous-3.1-beta-1-20050831.101112-42.jar",
201                      "org.apache.archiva.test", "redonkulous", "3.1-beta-1-20050831.101112-42", null, "jar" );
202     }
203
204     public void testValidDefaultTimestampedSnapshot()
205         throws Exception
206     {
207         assertValid(
208                      "org/apache/archiva/test/redonkulous/3.1-beta-1-SNAPSHOT/redonkulous-3.1-beta-1-20050831.101112-42.jar",
209                      "org.apache.archiva.test", "redonkulous", "3.1-beta-1-20050831.101112-42", null, "jar" );
210     }
211
212     public void testIsArtifact()
213     {
214         assertTrue( repoRequest.isArtifact( "test.maven-arch/poms/test-arch-2.0.3-SNAPSHOT.pom" ) );
215         assertTrue( repoRequest.isArtifact( "test/maven-arch/test-arch/2.0.3-SNAPSHOT/test-arch-2.0.3-SNAPSHOT.jar" ) );
216         assertTrue( repoRequest.isArtifact( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz" ) );
217
218         assertFalse( repoRequest.isArtifact( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.sha1" ) );
219         assertFalse( repoRequest.isArtifact( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.md5" ) );
220         assertFalse( repoRequest.isArtifact( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.asc" ) );
221         assertFalse( repoRequest.isArtifact( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.pgp" ) );
222         assertFalse( repoRequest.isArtifact( "org/apache/derby/derby/10.2.2.0/maven-metadata.xml" ) );
223         assertFalse( repoRequest.isArtifact( "org/apache/derby/derby/maven-metadata.xml" ) );
224     }
225
226     public void testIsSupportFile()
227     {
228         assertTrue( repoRequest.isSupportFile( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.sha1" ) );
229         assertTrue( repoRequest.isSupportFile( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.md5" ) );
230         assertTrue( repoRequest.isSupportFile( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.asc" ) );
231         assertTrue( repoRequest.isSupportFile( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.pgp" ) );
232         assertTrue( repoRequest.isSupportFile( "org/apache/derby/derby/10.2.2.0/maven-metadata.xml.sha1" ) );
233         assertTrue( repoRequest.isSupportFile( "org/apache/derby/derby/10.2.2.0/maven-metadata.xml.md5" ) );
234
235         assertFalse( repoRequest.isSupportFile( "test.maven-arch/poms/test-arch-2.0.3-SNAPSHOT.pom" ) );
236         assertFalse( repoRequest.isSupportFile( "test/maven-arch/test-arch/2.0.3-SNAPSHOT/test-arch-2.0.3-SNAPSHOT.jar" ) );
237         assertFalse( repoRequest.isSupportFile( "org/apache/archiva/archiva-api/1.0/archiva-api-1.0.xml.zip" ) );
238         assertFalse( repoRequest.isSupportFile( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz" ) );
239         assertFalse( repoRequest.isSupportFile( "org/apache/derby/derby/10.2.2.0/maven-metadata.xml" ) );
240         assertFalse( repoRequest.isSupportFile( "org/apache/derby/derby/maven-metadata.xml" ) );
241     }
242
243     public void testIsMetadata()
244     {
245         assertTrue( repoRequest.isMetadata( "org/apache/derby/derby/10.2.2.0/maven-metadata.xml" ));
246         assertTrue( repoRequest.isMetadata( "org/apache/derby/derby/maven-metadata.xml" ));
247
248         assertFalse( repoRequest.isMetadata( "test.maven-arch/poms/test-arch-2.0.3-SNAPSHOT.pom" ) );
249         assertFalse( repoRequest.isMetadata( "test/maven-arch/test-arch/2.0.3-SNAPSHOT/test-arch-2.0.3-SNAPSHOT.jar" ) );
250         assertFalse( repoRequest.isMetadata( "org/apache/archiva/archiva-api/1.0/archiva-api-1.0.xml.zip" ) );
251         assertFalse( repoRequest.isMetadata( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz" ) );
252         assertFalse( repoRequest.isMetadata( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.pgp" ) );
253         assertFalse( repoRequest.isMetadata( "org/apache/derby/derby/10.2.2.0/maven-metadata.xml.sha1" ) );
254     }
255
256     public void testIsDefault()
257     {
258         assertFalse( repoRequest.isDefault( "test.maven-arch/poms/test-arch-2.0.3-SNAPSHOT.pom" ) );
259         assertFalse( repoRequest.isDefault( "directory-clients/poms/ldap-clients-0.9.1-SNAPSHOT.pom" ) );
260         assertFalse( repoRequest.isDefault( "commons-lang/jars/commons-lang-2.1-javadoc.jar" ) );
261
262         assertTrue( repoRequest.isDefault( "test/maven-arch/test-arch/2.0.3-SNAPSHOT/test-arch-2.0.3-SNAPSHOT.jar" ) );
263         assertTrue( repoRequest.isDefault( "org/apache/archiva/archiva-api/1.0/archiva-api-1.0.xml.zip" ) );
264         assertTrue( repoRequest.isDefault( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz" ) );
265         assertTrue( repoRequest.isDefault( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.pgp" ) );
266         assertTrue( repoRequest.isDefault( "org/apache/derby/derby/10.2.2.0/maven-metadata.xml.sha1" ) );
267
268         assertFalse( repoRequest.isDefault( null ) );
269         assertFalse( repoRequest.isDefault( "" ) );
270         assertFalse( repoRequest.isDefault( "foo" ) );
271         assertFalse( repoRequest.isDefault( "some.short/path" ) );
272     }
273
274     public void testIsLegacy()
275     {
276         assertTrue( repoRequest.isLegacy( "test.maven-arch/poms/test-arch-2.0.3-SNAPSHOT.pom" ) );
277         assertTrue( repoRequest.isLegacy( "directory-clients/poms/ldap-clients-0.9.1-SNAPSHOT.pom" ) );
278         assertTrue( repoRequest.isLegacy( "commons-lang/jars/commons-lang-2.1-javadoc.jar" ) );
279
280         assertFalse( repoRequest.isLegacy( "test/maven-arch/test-arch/2.0.3-SNAPSHOT/test-arch-2.0.3-SNAPSHOT.jar" ) );
281         assertFalse( repoRequest.isLegacy( "org/apache/archiva/archiva-api/1.0/archiva-api-1.0.xml.zip" ) );
282         assertFalse( repoRequest.isLegacy( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz" ) );
283         assertFalse( repoRequest.isLegacy( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.pgp" ) );
284         assertFalse( repoRequest.isLegacy( "org/apache/derby/derby/10.2.2.0/maven-metadata.xml.sha1" ) );
285
286         assertFalse( repoRequest.isLegacy( null ) );
287         assertFalse( repoRequest.isLegacy( "" ) );
288         assertFalse( repoRequest.isLegacy( "some.short/path" ) );
289     }
290
291     private ManagedRepositoryContent createManagedRepo( String layout )
292         throws Exception
293     {
294         File repoRoot = getTestFile( "target/test-repo" );
295         return createManagedRepositoryContent( "test-internal", "Internal Test Repo", repoRoot, layout );
296     }
297
298     /**
299      * [MRM-481] Artifact requests with a .xml.zip extension fail with a 404 Error
300      */
301     public void testToNativePathArtifactDefaultToDefaultDualExtension()
302         throws Exception
303     {
304         ManagedRepositoryContent repository = createManagedRepo( "default" );
305
306         // Test (artifact) default to default - dual extension
307         assertEquals( "org/project/example-presentation/3.2/example-presentation-3.2.xml.zip", repoRequest
308             .toNativePath( "org/project/example-presentation/3.2/example-presentation-3.2.xml.zip", repository ) );
309     }
310
311     /**
312      * [MRM-481] Artifact requests with a .xml.zip extension fail with a 404 Error
313      */
314     public void testToNativePathArtifactLegacyToDefaultDualExtension()
315         throws Exception
316     {
317         ManagedRepositoryContent repository = createManagedRepo( "default" );
318
319         // Test (artifact) legacy to default - dual extension
320         // NOTE: The detection of a dual extension is flawed.
321         assertEquals( "org/project/example-presentation/3.2.xml/example-presentation-3.2.xml.zip", repoRequest
322             .toNativePath( "org.project/zips/example-presentation-3.2.xml.zip", repository ) );
323     }
324
325     public void testToNativePathMetadataDefaultToDefault()
326         throws Exception
327     {
328         ManagedRepositoryContent repository = createManagedRepo( "default" );
329
330         // Test (metadata) default to default
331         assertEquals( "org/apache/derby/derby/10.2.2.0/maven-metadata.xml.sha1", repoRequest
332             .toNativePath( "org/apache/derby/derby/10.2.2.0/maven-metadata.xml.sha1", repository ) );
333     }
334
335     public void testNativePathPomLegacyToDefault()
336         throws Exception
337     {
338         ManagedRepositoryContent repository = createManagedRepo( "default" );
339
340         // Test (pom) legacy to default
341         assertEquals( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0.pom",
342                       repoRequest.toNativePath( "org.apache.derby/poms/derby-10.2.2.0.pom", repository ) );
343     }
344
345     public void testNativePathPomLegacyToLegacy()
346         throws Exception
347     {
348         ManagedRepositoryContent repository = createManagedRepo( "legacy" );
349
350         // Test (pom) legacy to default
351         assertEquals( "org.apache.derby/poms/derby-10.2.2.0.pom",
352                       repoRequest.toNativePath( "org.apache.derby/poms/derby-10.2.2.0.pom", repository ) );
353     }
354
355     public void testNativePathPomLegacyToDefaultEjb()
356         throws Exception
357     {
358         ManagedRepositoryContent repository = createManagedRepo( "default" );
359
360         // Test (pom) legacy to default
361         assertEquals( "mygroup/myejb/1.0/myejb-1.0.jar",
362                       repoRequest.toNativePath( "mygroup/ejbs/myejb-1.0.jar", repository ) );
363     }
364
365     public void testNativePathPomLegacyToLegacyEjb()
366         throws Exception
367     {
368         ManagedRepositoryContent repository = createManagedRepo( "legacy" );
369
370         // Test (pom) legacy to default
371         assertEquals( "mygroup/ejbs/myejb-1.0.jar",
372                       repoRequest.toNativePath( "mygroup/ejbs/myejb-1.0.jar", repository ) );
373     }
374
375     public void testNativePathSupportFileLegacyToDefault()
376         throws Exception
377     {
378         ManagedRepositoryContent repository = createManagedRepo( "default" );
379
380         // Test (supportfile) legacy to default
381         assertEquals( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0.jar.sha1", repoRequest
382             .toNativePath( "org.apache.derby/jars/derby-10.2.2.0.jar.sha1", repository ) );
383     }
384
385     public void testNativePathBadRequestTooShort()
386         throws Exception
387     {
388         ManagedRepositoryContent repository = createManagedRepo( "default" );
389
390         // Test bad request path (too short)
391         try
392         {
393             repoRequest.toNativePath( "org.apache.derby/license.txt", repository );
394             fail( "Should have thrown an exception about a too short path." );
395         }
396         catch ( LayoutException e )
397         {
398             // expected path.
399         }
400     }
401
402     public void testNativePathBadRequestBlank()
403         throws Exception
404     {
405         ManagedRepositoryContent repository = createManagedRepo( "default" );
406
407         // Test bad request path (too short)
408         try
409         {
410             repoRequest.toNativePath( "", repository );
411             fail( "Should have thrown an exception about an blank request." );
412         }
413         catch ( LayoutException e )
414         {
415             // expected path.
416         }
417     }
418
419     public void testNativePathBadRequestNull()
420         throws Exception
421     {
422         ManagedRepositoryContent repository = createManagedRepo( "default" );
423
424         // Test bad request path (too short)
425         try
426         {
427             repoRequest.toNativePath( null, repository );
428             fail( "Should have thrown an exception about an null request." );
429         }
430         catch ( LayoutException e )
431         {
432             // expected path.
433         }
434     }
435
436     public void testNativePathBadRequestUnknownType()
437         throws Exception
438     {
439         ManagedRepositoryContent repository = createManagedRepo( "default" );
440
441         // Test bad request path (too short)
442         try
443         {
444             repoRequest.toNativePath( "org/apache/derby/derby/10.2.2.0/license.txt", repository );
445             fail( "Should have thrown an exception about an invalid type." );
446         }
447         catch ( LayoutException e )
448         {
449             // expected path.
450         }
451     }
452
453     public void testToNativePathLegacyMetadataDefaultToLegacy()
454         throws Exception
455     {
456         ManagedRepositoryContent repository = createManagedRepo( "legacy" );
457
458         // Test (metadata) default to legacy
459
460         // Special Case: This direction is not supported, should throw a LayoutException.
461         try
462         {
463             repoRequest.toNativePath( "org/apache/derby/derby/10.2.2.0/maven-metadata.xml", repository );
464             fail("Should have thrown a LayoutException, can't translate a maven-metadata.xml to a legacy layout.");
465         }
466         catch(LayoutException e)
467         {
468             // expected path.
469         }
470     }
471
472     public void testNativePathPomDefaultToLegacy()
473         throws Exception
474     {
475         ManagedRepositoryContent repository = createManagedRepo( "legacy" );
476
477         // Test (pom) default to legacy
478         assertEquals( "org.apache.derby/poms/derby-10.2.2.0.pom", repoRequest
479             .toNativePath( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0.pom", repository ) );
480     }
481
482     public void testNativePathSupportFileDefaultToLegacy()
483         throws Exception
484     {
485         ManagedRepositoryContent repository = createManagedRepo( "legacy" );
486
487         // Test (supportfile) default to legacy
488         assertEquals( "org.apache.derby/jars/derby-10.2.2.0.jar.sha1", repoRequest
489             .toNativePath( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0.jar.sha1", repository ) );
490     }
491
492     private void assertValid( String path, String groupId, String artifactId, String version, String classifier,
493                               String type )
494         throws Exception
495     {
496         String expectedId = "ArtifactReference - " + groupId + ":" + artifactId + ":" + version + ":"
497             + ( classifier != null ? classifier + ":" : "" ) + type;
498
499         ArtifactReference reference = repoRequest.toArtifactReference( path );
500
501         assertNotNull( expectedId + " - Should not be null.", reference );
502
503         assertEquals( expectedId + " - Group ID", groupId, reference.getGroupId() );
504         assertEquals( expectedId + " - Artifact ID", artifactId, reference.getArtifactId() );
505         if ( StringUtils.isNotBlank( classifier ) )
506         {
507             assertEquals( expectedId + " - Classifier", classifier, reference.getClassifier() );
508         }
509         assertEquals( expectedId + " - Version ID", version, reference.getVersion() );
510         assertEquals( expectedId + " - Type", type, reference.getType() );
511     }
512
513     private void assertInvalidRequest( String path )
514     {
515         try
516         {
517             repoRequest.toArtifactReference( path );
518             fail( "Expected a LayoutException on an invalid path [" + path + "]" );
519         }
520         catch ( LayoutException e )
521         {
522             /* expected path */
523         }
524     }
525
526     private RepositoryRequest repoRequest;
527
528     @Override
529     protected void setUp()
530         throws Exception
531     {
532         super.setUp();
533
534         repoRequest = (RepositoryRequest) lookup( RepositoryRequest.class );
535     }
536 }