public static final String getLine( LogChannelInterface log, BufferedInputStreamReader reader, int formatNr,
                                      StringBuilder line ) throws KettleFileException {
    EncodingType type = EncodingType.guessEncodingType( reader.getEncoding() );
    return getLine( log, reader, type, formatNr, line );
  }
@Test
  public void getLineBrokenByEnclosureLenientTest() throws Exception {
    System.setProperty( "KETTLE_COMPATIBILITY_TEXT_FILE_INPUT_USE_LENIENT_ENCLOSURE_HANDLING", "Y" );
    String text = "\"firstLine\n\"\"secondLine\"";
    StringBuilder linebuilder = new StringBuilder( "" );
    InputStream is = new ByteArrayInputStream( text.getBytes() );
    BufferedInputStreamReader isr = new BufferedInputStreamReader( new InputStreamReader( is ) );
    TextFileLine line = TextFileInputUtils.getLine( Mockito.mock( LogChannelInterface.class ), isr, EncodingType.SINGLE, 1, linebuilder, "\"", "", 0 );
    Assert.assertEquals( "\"firstLine", line.getLine() );
    System.clearProperty( "KETTLE_COMPATIBILITY_TEXT_FILE_INPUT_USE_LENIENT_ENCLOSURE_HANDLING" );
  }