@Test
public void testLangAttributeOnSoap11FaultString() throws Exception {
MessageFactory messageFactory = MessageFactory.newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
SOAPMessage saajMessage = messageFactory.createMessage();
SOAPBody saajSoapBody = saajMessage.getSOAPPart().getEnvelope().getBody();
SaajSoap11Body soapBody = new SaajSoap11Body(saajSoapBody, true);
soapBody.addClientOrSenderFault("Foo", Locale.ENGLISH);
assertNotNull("No Language set", saajSoapBody.getFault().getFaultStringLocale());
saajSoapBody = saajMessage.getSOAPPart().getEnvelope().getBody();
soapBody = new SaajSoap11Body(saajSoapBody, false);
soapBody.addClientOrSenderFault("Foo", Locale.ENGLISH);
assertNull("Language set", saajSoapBody.getFault().getFaultStringLocale());
}