public static void readStepRep( Object object, Repository rep, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
    try {
      String stepXML = rep.getStepAttributeString( id_step, "step-xml" );
      ByteArrayInputStream bais = new ByteArrayInputStream( stepXML.getBytes() );
      Document doc = XMLParserFactoryProducer.createSecureDocBuilderFactory().newDocumentBuilder().parse( bais );
      read( object, doc.getDocumentElement() );
    } catch ( ParserConfigurationException ex ) {
      throw new KettleException( ex.getMessage(), ex );
    } catch ( SAXException ex ) {
      throw new KettleException( ex.getMessage(), ex );
    } catch ( IOException ex ) {
      throw new KettleException( ex.getMessage(), ex );
    }
  }
@Test( expected = NullPointerException.class )
  public void readingStepRepoThrowsExceptionWhenParsingXmlWithBigAmountOfExternalEntities() throws Exception {
    SerializationHelper.readStepRep( null, repo, null, new ArrayList<>() );
  }