### Question:
ErrorHandlerImpl implements ErrorHandler { @Override public void error(SAXParseException exception) throws SAXException { result.addError(exception); } ErrorHandlerImpl(XmlValidationResult result); @Override void warning(SAXParseException exception); @Override void error(SAXParseException exception); @Override void fatalError(SAXParseException exception); List<SAXParseException> getExceptions();  }### Answer:
@Test public void testError() throws SAXException { SAXParseException eMock = mock(SAXParseException.class); sut.error(eMock); verify(resultMock, times(1)).addError(eMock); }