@Test(expected = IllegalStateException.class)
public void testIterableNoTermVectors() throws IOException {

  RAMDirectory directory = createTestIndex(Field.TermVector.NO);
  IndexReader reader = DirectoryReader.open(directory);
  
  
  Weight weight = new TFIDF();
  TermInfo termInfo = new CachedTermInfo(reader, "content", 1, 100);
  LuceneIterable iterable = new LuceneIterable(reader, "id", "content",  termInfo,weight);
  Iterator<Vector> iterator = iterable.iterator();
  iterator.hasNext();
  iterator.next();
}