server.start();
try
{
StreamingWagon wagon = (StreamingWagon) getWagon();
Repository testRepository = new Repository( "id", getRepositoryUrl( server ) );
File sourceFile = new File( localRepositoryPath, "test-secured-resource-exists" );
FileUtils.fileWrite( sourceFile.getAbsolutePath(), "top secret" );
wagon.connect( testRepository, authInfo );
try
{
assertTrue( wagon.resourceExists( "test-secured-resource-exists" ) );
assertFalse( wagon.resourceExists( "test-secured-resource-not-exists" ) );
}
finally
{
wagon.disconnect();
}
}
finally
{
server.stop();