public void readDataFromInputStream( InputStream is ) throws KettleException {
    // Clear the information
    //
    clear();

    if ( log.isBasic() ) {
      log.logBasic( BaseMessages.getString( PKG, "RepositoryMeta.Log.ReadingXMLFile", "FromInputStream" ) );
    }

    try {
      // Check and open XML document
      DocumentBuilderFactory dbf = XMLParserFactoryProducer.createSecureDocBuilderFactory();
      DocumentBuilder db = dbf.newDocumentBuilder();
      Document doc = db.parse( is );
      parseRepositoriesDoc( doc );
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "RepositoryMeta.Error.ReadingInfo" ), e );
    }
  }
@Test
  public void testErrorReadingInputStream() throws Exception {
    try {
      repoMeta.readDataFromInputStream(  getClass().getResourceAsStream( "filedoesnotexist.xml" ) );
    } catch ( KettleException e ) {
      assertEquals( Const.CR
        + "Error reading information from file:" + Const.CR
        + "InputStream cannot be null" + Const.CR, e.getMessage() );
    }
  }