releaseDescriptor.setScmSourceUrl( "scm-url" );
releaseDescriptor.setWorkingDirectory( getTestFile( "target/test/checkout" ).getAbsolutePath() );
Mock scmManagerMock = new Mock( ScmManager.class );
scmManagerMock.expects( new InvokeAtLeastOnceMatcher() ).method( "makeScmRepository" ).with(
new IsEqual( "scm-url" ) ).will( new ThrowStub( new NoSuchScmProviderException( "..." ) ) );
ScmManager scmManager = (ScmManager) scmManagerMock.proxy();
DefaultScmRepositoryConfigurator configurator =
(DefaultScmRepositoryConfigurator) lookup( ScmRepositoryConfigurator.ROLE );
configurator.setScmManager( scmManager );