releaseDescriptor.setUpdateDependencies( false );
Mock mock = new Mock( ReleaseManager.class );
Constraint[] constraints = new Constraint[] {
new IsEqual( releaseDescriptor ),
new IsInstanceOf( ReleaseEnvironment.class ),
new IsNull(),
new IsEqual( Boolean.TRUE ),
new IsEqual( Boolean.FALSE )
};
mock.expects( new InvokeOnceMatcher() ).method( "prepare" ).with( constraints ).will(
new ThrowStub( new ReleaseExecutionException( "..." ) ) );
mojo.setReleaseManager( (ReleaseManager) mock.proxy() );