soapFaultValidator.validateFaultDetail(receivedDetail, controlDetail, context, new XmlMessageValidationContext());
}
@Test(expectedExceptions = ValidationException.class, expectedExceptionsMessageRegExp = "Validation failed: Node value not equal for element 'code', expected '1002' but was '1001'")
public void testMultipleFaultDetailValidationError() {
SoapFault receivedDetail = new SoapFault();
receivedDetail.addFaultDetail(error);
receivedDetail.addFaultDetail(detail);
SoapFault controlDetail = new SoapFault();
controlDetail.addFaultDetail(error.replaceFirst("1001", "1002"));
controlDetail.addFaultDetail(detail);
soapFaultValidator.validateFaultDetail(receivedDetail, controlDetail, context, new XmlMessageValidationContext());
}