### Question:
PDIImportUtil { public static Document loadXMLFrom( String xml ) throws SAXException, IOException { return loadXMLFrom( new ByteArrayInputStream( xml.getBytes() ) ); }  static Repository connectToRepository( String repositoryName ); static void setRepositoryFactory( IRepositoryFactory factory ); static Document loadXMLFrom( String xml ); static Document loadXMLFrom( InputStream is ); static String asXml( Document document );  }### Answer:
@Test( timeout = 2000 ) public void whenLoadingMaliciousXmlFromStringParsingEndsWithNoErrorAndNullValueIsReturned() throws Exception { assertNull( PDIImportUtil.loadXMLFrom( MALICIOUS_XML ) ); }
@Test( timeout = 2000 ) public void whenLoadingMaliciousXmlFromInputStreamParsingEndsWithNoErrorAndNullValueIsReturned() throws Exception { assertNull( PDIImportUtil.loadXMLFrom( MALICIOUS_XML ) ); }
@Test public void whenLoadingLegalXmlFromStringNotNullDocumentIsReturned() throws Exception { final String trans = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<transformation>" + "</transformation>"; assertNotNull( PDIImportUtil.loadXMLFrom( trans ) ); }