File checkoutDirectory = getTestFile( "target/checkout-directory" );
releaseDescriptor.setCheckoutDirectory( checkoutDirectory.getAbsolutePath() );
Mock mock = new Mock( MavenExecutor.class );
Constraint[] constraints = new Constraint[]{new IsSame( checkoutDirectory ), new IsEqual( "goal1 goal2" ),
new IsEqual( Boolean.TRUE ), new IsEqual( "-Dmaven.test.skip=true" ), new IsNull(), new IsAnything()};
mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with( constraints );
RunPerformGoalsPhase phase = (RunPerformGoalsPhase) lookup( ReleasePhase.ROLE, "run-perform-goals" );
phase.setMavenExecutor( (MavenExecutor) mock.proxy() );
Mock scmProviderMock = new Mock( ScmProvider.class );