private void uploadArtifact( Artifact artifact, String content )
throws IOException, ArtifactTransferException
{
File file = TestFileUtils.createTempFile( content );
ArtifactUpload transfer = new ArtifactUpload( artifact, file );
FileRepositoryWorker worker = new FileRepositoryWorker( transfer, repository, session );
worker.setFileProcessor( TestFileProcessor.INSTANCE );
worker.run();
TestFileUtils.delete( file );
if ( transfer.getException() != null )
{
throw transfer.getException();
}
}