File sourceFile = new File( localRepositoryPath, "test-secured-resource" );
FileUtils.fileWrite( sourceFile.getAbsolutePath(), "top secret" );
wagon.connect( testRepository, authInfo );
StringOutputStream out = new StringOutputStream();
try
{
wagon.getToStream( "test-secured-resource", out );
}
finally
{
wagon.disconnect();
}
assertEquals( "top secret", out.toString() );
TestSecurityHandler securityHandler = (TestSecurityHandler) ( (Context) server.getHandler() ).getHandler();
testPreemptiveAuthenticationGet( securityHandler, supportPreemptiveAuthenticationGet() );
}
finally