private void checkLog(String... lines) throws Exception {
  BufferedReader br=new BufferedReader(new InputStreamReader(new FileInputStream(LOG_FILE)));
  List<String> logLines=new ArrayList<>(lines.length);
  String nextLogLine;
  while ((nextLogLine=br.readLine()) != null)   logLines.add(nextLogLine);
  U.closeQuiet(br);
  assertEquals(lines.length + 1,logLines.size());
  assertEquals(logLines.get(0),HDR);
  for (int i=0; i < lines.length; i++) {
    String logLine=logLines.get(i + 1);
    logLine=logLine.substring(logLine.indexOf(DELIM_FIELD,logLine.indexOf(DELIM_FIELD) + 1) + 1);
    assertEquals(lines[i],logLine);
  }
}

private void checkLog ( String ... lines ) throws Exception { BufferedReader br = new BufferedReader ( new InputStreamReader ( new FileInputStream ( LOG_FILE ) ) ) ; List < String > logLines = new ArrayList < > ( lines . length ) ; String nextLogLine ; while ( ( nextLogLine = br . readLine ( ) ) != null ) logLines . add ( nextLogLine ) ; U . closeQuiet ( br ) ; assertEquals ( lines . length + 1 , logLines . size ( ) ) ; assertEquals ( logLines . get ( 0 ) , HDR ) ; for ( int i = 0 ; i < lines . length ; i ++ ) { String logLine = logLines . get ( i + 1 ) ; logLine = logLine . substring ( logLine . indexOf ( DELIM_FIELD , logLine . indexOf ( DELIM_FIELD ) + 1 ) + 1 ) ; assertEquals ( lines [ i ] , logLine ) ; } }
ensure that log file has only the following lines .
