@Test
void verifyXMLDiffFiltersThrowingExceptions() throws Exception
{

    XMLDiffFilter alice = mock(XMLDiffFilter.class, "alice");
    doThrow(new RuntimeException("before alice failed!")).when(alice).before(any(Document.class));
    doThrow(new RuntimeException("after alice failed!")).when(alice).after(any(Document.class));
    XMLDiffFilter bob = mock(XMLDiffFilter.class, "bob");
    this.config.getFilters().add(0, alice);
    this.config.getFilters().add(bob);
    this.unifiedHTMLDiffManager.diff("<p>one</p>", "<p>two</p>", this.config);
    assertEquals("Failed to apply filter before diff.", this.logCapture.getMessage(0));
    assertEquals("Failed to apply filter before diff.", this.logCapture.getMessage(1));
    assertEquals("Failed to apply filter after diff.", this.logCapture.getMessage(2));
    verify(bob, times(2)).before(any(Document.class));
    verify(bob).after(any(Document.class));
}