@Test public void shouldMapTransformerException() throws Exception { doThrow(new TransformerException("foo")) .when(transformer) .transform(any(Source.class), any(Result.class)); try { Convert.toInputSource(new DOMSource(animalDocument()), tFac); fail("should have thrown XMLUnitException"); } catch (XMLUnitException ex) { assertEquals(XMLUnitException.class, ex.getClass()); } }
public static InputSource toInputSource(Source s) { return toInputSource(s, null); }
Convert { public static InputSource toInputSource(Source s) { return toInputSource(s, null); } }
Convert { public static InputSource toInputSource(Source s) { return toInputSource(s, null); } private  Convert(); }
Convert { public static InputSource toInputSource(Source s) { return toInputSource(s, null); } private  Convert(); static InputSource toInputSource(Source s); static InputSource toInputSource(Source s, TransformerFactory fac); static Document toDocument(Source s); static Document toDocument(Source s,
                                      DocumentBuilderFactory factory); static Node toNode(Source s); static Node toNode(Source s,
                              DocumentBuilderFactory factory); static NamespaceContext toNamespaceContext(Map<String, String> prefix2URI); }
Convert { public static InputSource toInputSource(Source s) { return toInputSource(s, null); } private  Convert(); static InputSource toInputSource(Source s); static InputSource toInputSource(Source s, TransformerFactory fac); static Document toDocument(Source s); static Document toDocument(Source s,
                                      DocumentBuilderFactory factory); static Node toNode(Source s); static Node toNode(Source s,
                              DocumentBuilderFactory factory); static NamespaceContext toNamespaceContext(Map<String, String> prefix2URI);  }