public void testSendError()
throws Exception
{
final String messageId = "testSendError" ;
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("5");
W3CEndpointReference coordinatorEndpoint = TestUtil.getCoordinatorEndpoint(instanceIdentifier.getInstanceIdentifier());
final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(TestUtil.coordinatorServiceURI, messageId);
final String reason = "testSendErrorReason" ;
final SoapFaultType soapFaultType = SoapFaultType.FAULT_SENDER ;
final QName subcode = ArjunaTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME ;
final SoapFault11 soapFault = new SoapFault11(soapFaultType, subcode, reason) ;
CoordinatorClient.getClient().sendSoapFault(coordinatorEndpoint, addressingProperties, soapFault, new InstanceIdentifier("sender"));
CoordinatorDetails details = testCoordinatorProcessor.getCoordinatorDetails(messageId, 10000);
assertNotNull(details.hasSoapFault());
assertEquals(details.hasSoapFault().getSoapFaultType(), soapFault.getSoapFaultType());
assertEquals(details.hasSoapFault().getReason(), soapFault.getReason());