Buggy code:
public class SendSoapMessageTestRunnerTest extends AbstractTestNGUnitTest { private WebServiceClient soapClient = EasyMock . createMock ( WebServiceClient . class ) ; private Producer messageProducer = EasyMock . createMock ( Producer . class ) ; private ApplicationContext applicationContextMock = EasyMock . createMock ( ApplicationContext . class ) ; private Resource resource = EasyMock . createMock ( Resource . class ) ; private SoapAttachment testAttachment = new SoapAttachment ( ) ; @ BeforeClass public void setup ( ) { } @ Test public void testFork ( ) { reset ( soapClient , messageProducer ) ; <START_BUG> expect ( soapClient . createProducer ( ) ) . andReturn ( messageProducer ) . times ( 2 ) ; <END_BUG> expect ( soapClient . getActor ( ) ) . andReturn ( null ) . atLeastOnce ( ) ; messageProducer . send ( anyObject ( Message . class ) , anyObject ( TestContext . class ) ) ; expectLastCall ( ) . andAnswer ( new org . easymock . IAnswer < Object > ( ) { @ Override public Object answer ( ) throws Throwable { Message message = ( ( Message ) ( getCurrentArguments ( ) [ 0 ] ) ) ; Assert . assertEquals ( message . getPayload ( String . class ) , "Foo" ) ; return null ; } } ) . atLeastOnce ( ) ; replay ( soapClient , messageProducer ) ; MockTestRunner builder = new MockTestRunner ( getClass ( ) . getSimpleName ( ) , applicationContext ) { @ Override public void execute ( ) { send ( new TestActionConfigurer < SendMessageBuilder > ( ) { @ Override public void configure ( SendMessageBuilder builder ) { builder . endpoint ( soapClient ) . soap ( ) . message ( new DefaultMessage ( "Foo" ) . setHeader ( "operation" , "foo" ) ) ; } } ) ; send ( new TestActionConfigurer < SendMessageBuilder > ( ) { @ Override public void configure ( SendMessageBuilder builder ) { builder . endpoint ( soapClient ) . soap ( ) . message ( new DefaultMessage ( "Foo" ) . setHeader ( "operation" , "foo" ) ) . fork ( true ) ; } } ) ; } } ; TestCase test = builder . getTestCase ( ) ; Assert . assertEquals ( test . getActionCount ( ) , 2 ) ; Assert . assertEquals ( test . getActions ( ) . get ( 0 ) . getClass ( ) , SendSoapMessageAction . class ) ; Assert . assertEquals ( test . getActions ( ) . get ( 1 ) . getClass ( ) , SendSoapMessageAction . class ) ; SendSoapMessageAction action = ( ( SendSoapMessageAction ) ( test . getActions ( ) . get ( 0 ) ) ) ; Assert . assertEquals ( action . getName ( ) , "send" ) ; Assert . assertEquals ( action . getEndpoint ( ) , soapClient ) ; Assert . assertEquals ( action . getMessageBuilder ( ) . getClass ( ) , PayloadTemplateMessageBuilder . class ) ; PayloadTemplateMessageBuilder messageBuilder = ( ( PayloadTemplateMessageBuilder ) ( action . getMessageBuilder ( ) ) ) ; Assert . assertEquals ( messageBuilder . getPayloadData ( ) , "Foo" ) ; Assert . assertEquals ( messageBuilder . getMessageHeaders ( ) . size ( ) , 1L ) ; Assert . assertEquals ( messageBuilder . getMessageHeaders ( ) . get ( "operation" ) , "foo" ) ; Assert . assertFalse ( action . isForkMode ( ) ) ; action = ( ( SendSoapMessageAction ) ( test . getActions ( ) . get ( 1 ) ) ) ; Assert . assertEquals ( action . getName ( ) , "send" ) ; Assert . assertEquals ( action . getEndpoint ( ) , soapClient ) ; Assert . assertEquals ( action . getMessageBuilder ( ) . getClass ( ) , PayloadTemplateMessageBuilder . class ) ; Assert . assertTrue ( action . isForkMode ( ) ) ; verify ( soapClient , messageProducer ) ; } @ Test public void testSoapAction ( ) { } @ Test public void testSoapAttachment ( ) { } @ Test public void testSoapAttachmentData ( ) { } @ Test public void testMultipleSoapAttachmentData ( ) { } @ Test public void testSoapAttachmentResource ( ) throws IOException { } @ Test public void testSendBuilderWithEndpointName ( ) { } @ Test ( expectedExceptions = CitrusRuntimeException . class , expectedExceptionsMessageRegExp = "Invalid<seq2seq4repair_space>use<seq2seq4repair_space>of<seq2seq4repair_space>http<seq2seq4repair_space>and<seq2seq4repair_space>soap<seq2seq4repair_space>action<seq2seq4repair_space>builder" ) public void testSendBuilderWithSoapAndHttpMixed ( ) { } }

Fix:
expect ( soapClient . createProducer ( ) ) . andReturn ( messageProducer ) . atLeastOnce ( ) ;