// with the right protocol.
byte[] bytes = sampleEnvelope_MustUnderstand.getBytes();
ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
StreamSource request = new StreamSource(bais);
SOAPFaultException e = null;
try {
Source response = dispatch.invoke(request);
} catch (SOAPFaultException ex) {
e = ex;
}
assertNotNull("We should have an exception, but none was thrown.", e);
assertEquals("FaultCode should be \"MustUnderstand\"", "MustUnderstand", e.getFault().getFaultCodeAsQName().getLocalPart());
}