@Test
public void testSameErrorTwice () throws Exception {
ValidationResult result = new ValidationResult(false);
result.addError(new ValidationResult.ValidationError(ERROR_CODE));
result.addError(new ValidationResult.ValidationError(ERROR_CODE));
parser.createResponseWithError(document,"pdftype",result,preflight);
Assert.assertNotNull(xpath.evaluate("errors[@count='2']", preflight, XPathConstants.NODE));
Assert.assertNotNull(xpath.evaluate("errors/error[@count='2']", preflight, XPathConstants.NODE));
Element code = (Element)xpath.evaluate("errors/error[@count='2']/code", preflight, XPathConstants.NODE);
Assert.assertNotNull(code);