config.setPreparationGoals( "clean integration-test" );
config.setWorkingDirectory( testFile.getAbsolutePath() );
Mock mock = new Mock( MavenExecutor.class );
Constraint[] constraints = new Constraint[]{new IsEqual( testFile ), new IsEqual( "clean integration-test" ),
new IsAnything(), new IsEqual( Boolean.TRUE ), new IsNull(), new IsAnything()};
mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with( constraints ).will(
new ThrowStub( new MavenExecutorException( "...", new Exception() ) ) );
phase.setMavenExecutor(ReleaseEnvironment.DEFAULT_MAVEN_EXECUTOR_ID, (MavenExecutor) mock.proxy() );