public static void assertVocabulary(Analyzer a,InputStream voc,InputStream out) throws IOException {
  BufferedReader vocReader=new BufferedReader(new InputStreamReader(voc,StandardCharsets.UTF_8));
  BufferedReader outputReader=new BufferedReader(new InputStreamReader(out,StandardCharsets.UTF_8));
  String inputWord=null;
  while ((inputWord=vocReader.readLine()) != null) {
    String expectedWord=outputReader.readLine();
    Assert.assertNotNull(expectedWord);
    BaseTokenStreamTestCase.checkOneTerm(a,inputWord,expectedWord);
  }
}

public static void assertVocabulary ( Analyzer a , InputStream voc , InputStream out ) throws IOException { BufferedReader vocReader = new BufferedReader ( new InputStreamReader ( voc , StandardCharsets . UTF_8 ) ) ; BufferedReader outputReader = new BufferedReader ( new InputStreamReader ( out , StandardCharsets . UTF_8 ) ) ; String inputWord = null ; while ( ( inputWord = vocReader . readLine ( ) ) != null ) { String expectedWord = outputReader . readLine ( ) ; Assert . assertNotNull ( expectedWord ) ; BaseTokenStreamTestCase . checkOneTerm ( a , inputWord , expectedWord ) ; } }
run a vocabulary test against two data files .
