RunPerformGoalsPhase phase = (RunPerformGoalsPhase) lookup( ReleasePhase.ROLE, "run-perform-goals" );
phase.setMavenExecutor( (MavenExecutor) mock.proxy() );
Mock scmProviderMock = new Mock( ScmProvider.class );
constraints = new Constraint[]{new IsAnything(), new IsScmFileSetEquals( new ScmFileSet( checkoutDirectory ) ),
new IsInstanceOf( ScmTag.class )};
scmProviderMock.expects( new InvokeOnceMatcher() ).method( "checkOut" ).with( constraints ).will(
new ReturnStub( new CheckOutScmResult( "...", Collections.<ScmFile>emptyList() ) ) );
ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
stub.setScmProvider( (ScmProvider) scmProviderMock.proxy() );