public static TransformerFactory getTransformerFactory() {
        TransformerFactory transformerFactory = TransformerFactory.newInstance();
        setAttribute(transformerFactory, XMLConstants.ACCESS_EXTERNAL_DTD);
        setAttribute(transformerFactory, XMLConstants.ACCESS_EXTERNAL_STYLESHEET);
        return transformerFactory;
    }
@Test
    public void testGetTransformerFactory() {
        TransformerFactory transformerFactory = XmlUtil.getTransformerFactory();
        assertNotNull(transformerFactory);
        assertThrows(IllegalArgumentException.class, () -> XmlUtil.setAttribute(transformerFactory, "test://no-such-property"));
        ignoreXxeFailureProp.setOrClearProperty("false");
        assertThrows(IllegalArgumentException.class, () -> XmlUtil.setAttribute(transformerFactory, "test://no-such-property"));
        ignoreXxeFailureProp.setOrClearProperty("true");
        XmlUtil.setAttribute(transformerFactory, "test://no-such-property");
    }