SoapFaultDefinition defaultFault = new SoapFaultDefinition();
defaultFault.setFaultCode(SoapFaultDefinition.CLIENT);
resolver.setDefaultFault(defaultFault);
MessageFactory messageFactory = MessageFactory.newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
SOAPMessage message = messageFactory.createMessage();
SoapMessageFactory factory = new SaajSoapMessageFactory(messageFactory);
MessageContext context = new DefaultMessageContext(new SaajSoapMessage(message), factory);
boolean result = resolver.resolveException(context, null, new IllegalArgumentException("bla"));
Assert.assertTrue("resolveException returns false", result);
Assert.assertTrue("Context has no response", context.hasResponse());