SendSoapFaultAction action = getNextTestActionFromTest();
Assert.assertEquals(action.getEndpoint(), beanDefinitionContext.getBean("soapServer"));
Assert.assertNotNull(action.getMessageBuilder());
Assert.assertEquals(action.getMessageBuilder().getClass(), PayloadTemplateMessageBuilder.class);
PayloadTemplateMessageBuilder messageBuilder = (PayloadTemplateMessageBuilder)action.getMessageBuilder();
Assert.assertNull(messageBuilder.getPayloadData());
Assert.assertNull(messageBuilder.getPayloadResourcePath());
Assert.assertEquals(messageBuilder.getMessageHeaders().size(), 1L);
Assert.assertEquals(messageBuilder.getMessageHeaders().get("operation"), "sendFault");
Assert.assertEquals(action.getFaultCode(), "{http://www.citrusframework.org/faults}citrus-ns:FAULT-1000");
Assert.assertEquals(action.getFaultString(), "FaultString");
Assert.assertEquals(action.getFaultDetails().size(), 1);
Assert.assertTrue(action.getFaultDetails().get(0).startsWith("<ns0:FaultDetail xmlns:ns0=\"http://www.consol.de/schemas/samples/sayHello.xsd\">"));
Assert.assertNull(action.getFaultActor());
// 2nd action
action = getNextTestActionFromTest();
Assert.assertEquals(action.getEndpoint(), beanDefinitionContext.getBean("soapServer"));
Assert.assertNotNull(action.getMessageBuilder());
Assert.assertEquals(action.getMessageBuilder().getClass(), PayloadTemplateMessageBuilder.class);
messageBuilder = (PayloadTemplateMessageBuilder)action.getMessageBuilder();
Assert.assertNull(messageBuilder.getPayloadData());
Assert.assertNull(messageBuilder.getPayloadResourcePath());
Assert.assertEquals(messageBuilder.getMessageHeaders().size(), 1);
Assert.assertEquals(messageBuilder.getMessageHeaders().get("operation"), "sendFault");
Assert.assertEquals(action.getFaultCode(), "{http://www.citrusframework.org/faults}citrus-ns:FAULT-1001");
Assert.assertEquals(action.getFaultString(), "FaultString");
Assert.assertEquals(action.getFaultDetails().size(), 0);
Assert.assertEquals(action.getFaultDetailResourcePaths().size(), 1);
Assert.assertEquals(action.getFaultDetailResourcePaths().get(0), "classpath:com/consol/citrus/ws/actions/test-fault-detail.xml");