View Javadoc

1   package org.apache.maven.archiva.proxy;
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.io.FileUtils;
23  import org.apache.commons.lang.StringUtils;
24  import org.apache.maven.archiva.model.ArtifactReference;
25  import org.apache.maven.archiva.policies.CachedFailuresPolicy;
26  import org.apache.maven.archiva.policies.ChecksumPolicy;
27  import org.apache.maven.archiva.policies.ReleasesPolicy;
28  import org.apache.maven.archiva.policies.SnapshotsPolicy;
29  import org.apache.maven.wagon.ResourceDoesNotExistException;
30  
31  import java.io.File;
32  
33  /**
34   * ManagedDefaultTransferTest
35   *
36   * @version $Id: ManagedDefaultTransferTest.java 718864 2008-11-19 06:33:35Z brett $
37   */
38  public class ManagedDefaultTransferTest
39      extends AbstractProxyTestCase
40  {
41      public void testGetDefaultLayoutNotPresentConnectorOffline()
42          throws Exception
43      {
44          String path = "org/apache/maven/test/get-default-layout/1.0/get-default-layout-1.0.jar";
45          setupTestableManagedRepository( path );
46  
47          File expectedFile = new File( managedDefaultDir, path );
48          ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
49  
50          // Ensure file isn't present first.
51          assertNotExistsInManagedDefaultRepo( expectedFile );
52  
53          // Configure Connector (usually done within archiva.xml configuration)
54          saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ONCE, SnapshotsPolicy.ONCE,
55                         CachedFailuresPolicy.NO, true );
56  
57          // Attempt the proxy fetch.
58          File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
59          assertNull("File should not have been downloaded", downloadedFile);
60      }
61      
62      public void testGetDefaultLayoutNotPresent()
63          throws Exception
64      {
65          String path = "org/apache/maven/test/get-default-layout/1.0/get-default-layout-1.0.jar";
66          setupTestableManagedRepository( path );
67  
68          File expectedFile = new File( managedDefaultDir, path );
69          ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
70  
71          // Ensure file isn't present first.
72          assertNotExistsInManagedDefaultRepo( expectedFile );
73  
74          // Configure Connector (usually done within archiva.xml configuration)
75          saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ONCE, SnapshotsPolicy.ONCE,
76                         CachedFailuresPolicy.NO, false );
77  
78          // Attempt the proxy fetch.
79          File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
80  
81          File sourceFile = new File( REPOPATH_PROXIED1, path );
82          assertFileEquals( expectedFile, downloadedFile, sourceFile );
83          assertNoTempFiles( expectedFile );
84      }
85  
86      public void testGetDefaultLayoutNotPresentPassthrough()
87          throws Exception
88      {
89          String path = "org/apache/maven/test/get-default-layout/1.0/get-default-layout-1.0.jar.asc";
90          setupTestableManagedRepository( path );
91  
92          File expectedFile = new File( managedDefaultDir, path );
93  
94          // Ensure file isn't present first.
95          assertNotExistsInManagedDefaultRepo( expectedFile );
96  
97          // Configure Connector (usually done within archiva.xml configuration)
98          saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ONCE, SnapshotsPolicy.ONCE,
99                         CachedFailuresPolicy.NO, false );
100 
101         // Attempt the proxy fetch.
102         File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, path );
103 
104         File sourceFile = new File( REPOPATH_PROXIED1, path );
105         assertFileEquals( expectedFile, downloadedFile, sourceFile );
106         assertFalse( new File( downloadedFile.getParentFile(), downloadedFile.getName() + ".sha1" ).exists() );
107         assertFalse( new File( downloadedFile.getParentFile(), downloadedFile.getName() + ".md5" ).exists() );
108         assertFalse( new File( downloadedFile.getParentFile(), downloadedFile.getName() + ".asc" ).exists() );
109         assertNoTempFiles( expectedFile );
110     }
111 
112     /**
113      * The attempt here should result in no file being transferred.
114      * <p/>
115      * The file exists locally, and the policy is ONCE.
116      *
117      * @throws Exception
118      */
119     public void testGetDefaultLayoutAlreadyPresentPolicyOnce()
120         throws Exception
121     {
122         String path = "org/apache/maven/test/get-default-layout-present/1.0/get-default-layout-present-1.0.jar";
123         setupTestableManagedRepository( path );
124 
125         File expectedFile = new File( managedDefaultDir, path );
126 
127         ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
128 
129         assertTrue( expectedFile.exists() );
130 
131         // Configure Connector (usually done within archiva.xml configuration)
132         saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ONCE, SnapshotsPolicy.ONCE,
133                        CachedFailuresPolicy.NO, false );
134 
135         // Attempt the proxy fetch.
136         File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
137 
138         assertFileEquals( expectedFile, downloadedFile, expectedFile );
139         assertNoTempFiles( expectedFile );
140     }
141 
142     /**
143      * The attempt here should result in no file being transferred.
144      * <p/>
145      * The file exists locally, and the policy is ONCE.
146      *
147      * @throws Exception
148      */
149     public void testGetDefaultLayoutAlreadyPresentPassthrough()
150         throws Exception
151     {
152         String path = "org/apache/maven/test/get-default-layout-present/1.0/get-default-layout-present-1.0.jar.asc";
153         setupTestableManagedRepository( path );
154 
155         File expectedFile = new File( managedDefaultDir, path );
156         File remoteFile = new File( REPOPATH_PROXIED1, path );
157 
158         assertTrue( expectedFile.exists() );
159 
160         // Set the managed File to be newer than local.
161         setManagedOlderThanRemote( expectedFile, remoteFile );
162         long originalModificationTime = expectedFile.lastModified();
163 
164         // Configure Connector (usually done within archiva.xml configuration)
165         saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ONCE, SnapshotsPolicy.ONCE,
166                        CachedFailuresPolicy.NO, false );
167 
168         // Attempt the proxy fetch.
169         File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, path );
170 
171         assertNotDownloaded( downloadedFile );
172         assertNotModified( expectedFile, originalModificationTime );
173         assertNoTempFiles( expectedFile );
174     }
175 
176     /**
177      * <p>
178      * Request a file, that exists locally, and remotely.
179      * </p>
180      * <p>
181      * All policies are set to IGNORE.
182      * </p>
183      * <p>
184      * Managed file is newer than remote file.
185      * </p>
186      * <p>
187      * Transfer should not have occured, as managed file is newer.
188      * </p>
189      *
190      * @throws Exception
191      */
192     public void testGetDefaultLayoutAlreadyPresentNewerThanRemotePolicyIgnored()
193         throws Exception
194     {
195         String path = "org/apache/maven/test/get-default-layout-present/1.0/get-default-layout-present-1.0.jar";
196         setupTestableManagedRepository( path );
197 
198         File expectedFile = new File( managedDefaultDir, path );
199         File remoteFile = new File( REPOPATH_PROXIED1, path );
200         
201         // Set the managed File to be newer than local.
202         setManagedNewerThanRemote( expectedFile, remoteFile );
203 
204         long originalModificationTime = expectedFile.lastModified();
205         ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
206 
207         assertTrue( expectedFile.exists() );
208 
209         // Configure Connector (usually done within archiva.xml configuration)
210         saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
211                        SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
212 
213         // Attempt the proxy fetch.
214         File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
215 
216         assertNotDownloaded( downloadedFile );
217         assertNotModified( expectedFile, originalModificationTime );
218         assertNoTempFiles( expectedFile );
219     }
220     
221     /**
222      * <p>
223      * Request a file, that exists locally, and remotely.
224      * </p>
225      * <p>
226      * All policies are set to IGNORE.
227      * </p>
228      * <p>
229      * Managed file is older than Remote file.
230      * </p>
231      * <p>
232      * Transfer should have occured, as managed file is older than remote.
233      * </p>
234      *
235      * @throws Exception
236      */
237     public void testGetDefaultLayoutAlreadyPresentOlderThanRemotePolicyIgnored()
238         throws Exception
239     {
240         String path = "org/apache/maven/test/get-default-layout-present/1.0/get-default-layout-present-1.0.jar";
241         setupTestableManagedRepository( path );
242 
243         File expectedFile = new File( managedDefaultDir, path );
244         File remoteFile = new File( REPOPATH_PROXIED1, path );
245         
246         // Set the managed file to be newer than remote file.
247         setManagedOlderThanRemote( expectedFile, remoteFile );
248     
249         ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
250 
251         assertTrue( expectedFile.exists() );
252 
253         // Configure Connector (usually done within archiva.xml configuration)
254         saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
255                        SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
256 
257         // Attempt the proxy fetch.
258         File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
259 
260         File proxiedFile = new File( REPOPATH_PROXIED1, path );
261         assertFileEquals( expectedFile, downloadedFile, proxiedFile );
262         assertNoTempFiles( expectedFile );
263     }
264 
265     /**
266      * The attempt here should result in file being transferred.
267      * <p/>
268      * The file exists locally, is over 6 years old, and the policy is DAILY.
269      *
270      * @throws Exception
271      */
272     public void testGetDefaultLayoutRemoteUpdate()
273         throws Exception
274     {
275         String path = "org/apache/maven/test/get-default-layout-present/1.0/get-default-layout-present-1.0.jar";
276         setupTestableManagedRepository( path );
277 
278         File expectedFile = new File( managedDefaultDir, path );
279         ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
280 
281         assertTrue( expectedFile.exists() );
282         expectedFile.setLastModified( getPastDate().getTime() );
283 
284         // Configure Connector (usually done within archiva.xml configuration)
285         saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.DAILY, SnapshotsPolicy.DAILY,
286                        CachedFailuresPolicy.NO, false );
287 
288         // Attempt the proxy fetch.
289         File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
290 
291         File proxiedFile = new File( REPOPATH_PROXIED1, path );
292         assertFileEquals( expectedFile, downloadedFile, proxiedFile );
293         assertNoTempFiles( expectedFile );
294     }
295 
296     public void testGetWhenInBothProxiedRepos()
297         throws Exception
298     {
299         String path = "org/apache/maven/test/get-in-both-proxies/1.0/get-in-both-proxies-1.0.jar";
300         setupTestableManagedRepository( path );
301 
302         File expectedFile = new File( managedDefaultDir, path );
303         ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
304 
305         assertNotExistsInManagedDefaultRepo( expectedFile );
306 
307         // Configure Connector (usually done within archiva.xml configuration)
308         saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1 , false );
309         saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2 , false );
310 
311         // Attempt the proxy fetch.
312         File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
313 
314         File proxied1File = new File( REPOPATH_PROXIED1, path );
315         File proxied2File = new File( REPOPATH_PROXIED2, path );
316         assertFileEquals( expectedFile, downloadedFile, proxied1File );
317         assertNoTempFiles( expectedFile );
318 
319         // TODO: is this check even needed if it passes above? 
320         String actualContents = FileUtils.readFileToString( downloadedFile, null );
321         String badContents = FileUtils.readFileToString( proxied2File, null );
322         assertFalse( "Downloaded file contents should not be that of proxy 2",
323                      StringUtils.equals( actualContents, badContents ) );
324     }
325 
326     public void testGetInSecondProxiedRepo()
327         throws Exception
328     {
329         String path = "org/apache/maven/test/get-in-second-proxy/1.0/get-in-second-proxy-1.0.jar";
330         setupTestableManagedRepository( path );
331 
332         File expectedFile = new File( managedDefaultDir, path );
333         ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
334 
335         assertNotExistsInManagedDefaultRepo( expectedFile );
336 
337         // Configure Connector (usually done within archiva.xml configuration)
338         saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, false );
339         saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, false );
340 
341         // Attempt the proxy fetch.
342         File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
343 
344         File proxied2File = new File( REPOPATH_PROXIED2, path );
345         assertFileEquals( expectedFile, downloadedFile, proxied2File );
346         assertNoTempFiles( expectedFile );
347     }
348 
349     public void testNotFoundInAnyProxies()
350         throws Exception
351     {
352         String path = "org/apache/maven/test/does-not-exist/1.0/does-not-exist-1.0.jar";
353         setupTestableManagedRepository( path );
354 
355         File expectedFile = new File( managedDefaultDir, path );
356         ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
357 
358         assertNotExistsInManagedDefaultRepo( expectedFile );
359 
360         // Configure Connector (usually done within archiva.xml configuration)
361         saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, false );
362         saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, false );
363         saveConnector( ID_DEFAULT_MANAGED, ID_LEGACY_PROXIED, false );
364 
365         // Attempt the proxy fetch.
366         File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
367 
368         assertNull( "File returned was: " + downloadedFile + "; should have got a not found exception",
369                     downloadedFile );
370         assertNoTempFiles( expectedFile );
371     }
372 
373     public void testGetInSecondProxiedRepoFirstFails()
374         throws Exception
375     {
376         String path = "org/apache/maven/test/get-in-second-proxy/1.0/get-in-second-proxy-1.0.jar";
377         setupTestableManagedRepository( path );
378 
379         File expectedFile = new File( managedDefaultDir, path );
380         ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
381 
382         assertNotExistsInManagedDefaultRepo( expectedFile );
383 
384         // Configure Repository (usually done within archiva.xml configuration)
385         saveRemoteRepositoryConfig( "badproxied", "Bad Proxied", "test://bad.machine.com/repo/", "default" );
386 
387         wagonMock.get( path, new File( expectedFile.getAbsolutePath() + ".tmp" ) );
388         wagonMockControl.setMatcher(customWagonGetMatcher);
389         wagonMockControl.setThrowable( new ResourceDoesNotExistException( "transfer failed" ) );
390         wagonMockControl.replay();
391 
392         // Configure Connector (usually done within archiva.xml configuration)
393         saveConnector( ID_DEFAULT_MANAGED, "badproxied", false );
394         saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, false );
395 
396         // Attempt the proxy fetch.
397         File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
398 
399         wagonMockControl.verify();
400 
401         File proxied2File = new File( REPOPATH_PROXIED2, path );
402         assertFileEquals( expectedFile, downloadedFile, proxied2File );
403         assertNoTempFiles( expectedFile );
404     }
405 
406     public void testGetAllRepositoriesFail()
407         throws Exception
408     {
409         String path = "org/apache/maven/test/get-in-second-proxy/1.0/get-in-second-proxy-1.0.jar";
410         setupTestableManagedRepository( path );
411 
412         File expectedFile = new File( managedDefaultDir.getAbsoluteFile(), path );
413         ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
414 
415         assertNotExistsInManagedDefaultRepo( expectedFile );
416 
417         // Configure Repository (usually done within archiva.xml configuration)
418         saveRemoteRepositoryConfig( "badproxied1", "Bad Proxied 1", "test://bad.machine.com/repo/", "default" );
419         saveRemoteRepositoryConfig( "badproxied2", "Bad Proxied 2", "test://dead.machine.com/repo/", "default" );
420 
421         // Configure Connector (usually done within archiva.xml configuration)
422         saveConnector( ID_DEFAULT_MANAGED, "badproxied1", false );
423         saveConnector( ID_DEFAULT_MANAGED, "badproxied2", false );
424 
425         File tmpFile = new File( expectedFile.getParentFile(), expectedFile.getName() + ".tmp" );
426         wagonMock.get( path, tmpFile );
427         
428         wagonMockControl.setMatcher(customWagonGetMatcher);
429         wagonMockControl.setThrowable( new ResourceDoesNotExistException( "Can't find resource." ) );
430 
431         wagonMock.get( path, tmpFile );
432         
433         wagonMockControl.setMatcher(customWagonGetMatcher);
434         wagonMockControl.setThrowable( new ResourceDoesNotExistException( "Can't find resource." ) );
435 
436         wagonMockControl.replay();
437 
438         File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
439 
440         assertNotDownloaded( downloadedFile );
441 
442         wagonMockControl.verify();
443         assertNoTempFiles( expectedFile );
444 
445         // TODO: do not want failures to present as a not found [MRM-492]
446         // TODO: How much information on each failure should we pass back to the user vs. logging in the proxy? 
447     }
448 
449     public void testGetFromLegacyProxyAlreadyPresentInManaged_NewerThanRemote()
450         throws Exception
451     {
452         String legacyPath = "org.apache.maven.test/jars/get-default-layout-present-1.0.jar";
453         String path = "org/apache/maven/test/get-default-layout-present/1.0/get-default-layout-present-1.0.jar";
454         setupTestableManagedRepository( path );
455 
456         File expectedFile = new File( managedDefaultDir, path );
457         File remoteFile = new File( REPOPATH_PROXIED_LEGACY, legacyPath );
458         
459         // Set the managed file to be newer than remote.
460         setManagedNewerThanRemote( expectedFile, remoteFile );
461         long expectedTimestamp = expectedFile.lastModified();
462         
463         ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
464         
465         assertTrue( expectedFile.exists() );
466 
467         // Configure Connector (usually done within archiva.xml configuration)
468         saveConnector( ID_DEFAULT_MANAGED, ID_LEGACY_PROXIED, false );
469 
470         File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
471 
472         assertNotDownloaded( downloadedFile );
473         assertNotModified( expectedFile, expectedTimestamp );
474         assertNoTempFiles( expectedFile );
475     }
476     
477     public void testGetFromLegacyProxyAlreadyPresentInManaged_OlderThanRemote()
478         throws Exception
479     {
480         String legacyPath = "org.apache.maven.test/jars/get-default-layout-present-1.0.jar";
481         String path = "org/apache/maven/test/get-default-layout-present/1.0/get-default-layout-present-1.0.jar";
482         setupTestableManagedRepository( path );
483 
484         File expectedFile = new File( managedDefaultDir, path );
485         File remoteFile = new File( REPOPATH_PROXIED_LEGACY, legacyPath );
486 
487         // Set the managed file to be older than remote.
488         setManagedOlderThanRemote( expectedFile, remoteFile );
489 
490         ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
491 
492         assertTrue( expectedFile.exists() );
493 
494         // Configure Connector (usually done within archiva.xml configuration)
495         saveConnector( ID_DEFAULT_MANAGED, ID_LEGACY_PROXIED, false );
496 
497         File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
498 
499         File proxiedFile = new File( REPOPATH_PROXIED_LEGACY, legacyPath );
500         assertFileEquals( expectedFile, downloadedFile, proxiedFile );
501         assertNoTempFiles( expectedFile );
502     }
503 
504     public void testGetFromLegacyProxyNotPresentInManaged()
505         throws Exception
506     {
507         String legacyPath = "org.apache.maven.test/jars/example-lib-2.2.jar";
508         String path = "org/apache/maven/test/example-lib/2.2/example-lib-2.2.jar";
509         setupTestableManagedRepository( path );
510 
511         File expectedFile = new File( managedDefaultDir, path );
512         ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
513 
514         assertNotExistsInManagedDefaultRepo( expectedFile );
515 
516         // Configure Connector (usually done within archiva.xml configuration)
517         saveConnector( ID_DEFAULT_MANAGED, ID_LEGACY_PROXIED, false);
518 
519         File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
520 
521         File proxiedFile = new File( REPOPATH_PROXIED_LEGACY, legacyPath );
522         assertFileEquals( expectedFile, downloadedFile, proxiedFile );
523         assertNoTempFiles( expectedFile );
524     }
525 
526     public void testGetFromLegacyProxyPluginNotPresentInManaged()
527         throws Exception
528     {
529         String legacyPath = "org.apache.maven.test/maven-plugins/example-maven-plugin-0.42.jar";
530         String path = "org/apache/maven/test/example-maven-plugin/0.42/example-maven-plugin-0.42.jar";
531         setupTestableManagedRepository( path );
532 
533         File expectedFile = new File( managedDefaultDir, path );
534         ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
535 
536         assertNotExistsInManagedDefaultRepo( expectedFile );
537 
538         // Configure Connector (usually done within archiva.xml configuration)
539         saveConnector( ID_DEFAULT_MANAGED, ID_LEGACY_PROXIED, false  );
540 
541         File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
542 
543         File proxiedFile = new File( REPOPATH_PROXIED_LEGACY, legacyPath );
544         assertFileEquals( expectedFile, downloadedFile, proxiedFile );
545         assertNoTempFiles( expectedFile );
546     }
547 }