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 );