Code example for TransformerException

0
    } 
 
    @Test 
    public void test() throws Exception { 
 
        listener.error(new TransformerException("error transform failure")); 
        listener.fatalError(new TransformerException("fatal error transform failure")); 
        listener.warning(new TransformerException("warning")); 
 
        assertTrue(listener.getErrors().toString().contains("error transform failure")); 
        assertTrue(listener.getErrors().toString().contains("fatal error transform failure")); 
        assertTrue(listener.getWarnings().toString().contains("warning")); 
 
    } 
}