Mock commandLineMock = createMockCommandLine( workingDirectory, process );
expectDefaultArguments( commandLineMock );
Mock mock = new Mock( CommandLineFactory.class );
mock.expects( new InvokeOnceMatcher() ).method( "createCommandLine" ).with( new IsEqual( "mvn" ) ).will(
new ReturnStub( commandLineMock.proxy() ) );
executor.setCommandLineFactory( (CommandLineFactory) mock.proxy() );
executor.executeGoals( workingDirectory, "clean integration-test", false, null, new ReleaseResult() );