Buggy code:
public class SendHttpMessageTestRunnerTest extends AbstractTestNGUnitTest { private HttpClient httpClient = EasyMock . createMock ( HttpClient . class ) ; private Producer messageProducer = EasyMock . createMock ( Producer . class ) ; private ApplicationContext applicationContextMock = EasyMock . createMock ( ApplicationContext . class ) ; @ Test public void testFork ( ) { reset ( httpClient , messageProducer ) ; <START_BUG> expect ( httpClient . createProducer ( ) ) . andReturn ( messageProducer ) . times ( 2 ) ; <END_BUG> expect ( httpClient . 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 ( httpClient , messageProducer ) ; MockTestRunner builder = new MockTestRunner ( getClass ( ) . getSimpleName ( ) , applicationContext ) { @ Override public void execute ( ) { send ( new TestActionConfigurer < SendMessageBuilder > ( ) { @ Override public void configure ( SendMessageBuilder builder ) { builder . endpoint ( httpClient ) . http ( ) . messageType ( PLAINTEXT ) . message ( new DefaultMessage ( "Foo" ) . setHeader ( "operation" , "foo" ) ) ; } } ) ; send ( new TestActionConfigurer < SendMessageBuilder > ( ) { @ Override public void configure ( SendMessageBuilder builder ) { builder . endpoint ( httpClient ) . message ( new DefaultMessage ( "Foo" ) . setHeader ( "operation" , "foo" ) ) . messageType ( PLAINTEXT ) . http ( ) . fork ( true ) ; } } ) ; } } ; TestCase test = builder . getTestCase ( ) ; Assert . assertEquals ( test . getActionCount ( ) , 2 ) ; Assert . assertEquals ( test . getActions ( ) . get ( 0 ) . getClass ( ) , SendMessageAction . class ) ; Assert . assertEquals ( test . getActions ( ) . get ( 1 ) . getClass ( ) , SendMessageAction . class ) ; SendMessageAction action = ( ( SendMessageAction ) ( test . getActions ( ) . get ( 0 ) ) ) ; Assert . assertEquals ( action . getName ( ) , "send" ) ; Assert . assertEquals ( action . getEndpoint ( ) , httpClient ) ; 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 = ( ( SendMessageAction ) ( test . getActions ( ) . get ( 1 ) ) ) ; Assert . assertEquals ( action . getName ( ) , "send" ) ; Assert . assertEquals ( action . getEndpoint ( ) , httpClient ) ; Assert . assertEquals ( action . getMessageBuilder ( ) . getClass ( ) , PayloadTemplateMessageBuilder . class ) ; Assert . assertTrue ( action . isForkMode ( ) ) ; } @ Test public void testHttpMethod ( ) { } @ Test public void testHttpRequestUriAndPath ( ) { } @ Test public void testHttpRequestUriAndQueryParams ( ) { } @ 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 ( httpClient . createProducer ( ) ) . andReturn ( messageProducer ) . atLeastOnce ( ) ;