Directory dir = newDirectory();
IndexWriter writer;
IndexWriterConfig c = new IndexWriterConfig(TEST_VERSION_CURRENT, new ThrowingAnalyzer());
final ByteArrayOutputStream infoBytes = new ByteArrayOutputStream();
PrintStream infoPrintStream = new PrintStream(infoBytes, true, "utf-8");
PrintStreamInfoStream printStreamInfoStream = new PrintStreamInfoStream(infoPrintStream);
c.setInfoStream(printStreamInfoStream);
writer = new IndexWriter(dir, c);
Document doc = new Document();
doc.add(newField("distinctiveFieldName", "aaa ", storedTextType));
try {