/**
* Since there are so many combinations of results here, we are only going
* to assert a few. - J.G.
*/
int x = 0;
TermPositionVector vector = (TermPositionVector) reader.getTermFreqVector(x, "content");
assertNotNull(vector);
String[] terms = vector.getTerms();
int[] freqs = vector.getTermFrequencies();
assertEquals("electrical", terms[x]);
assertEquals(2, freqs[x]);
TermVectorOffsetInfo[] offsets = vector.getOffsets(x);
assertEquals(0, offsets[x].getStartOffset());
assertEquals(10, offsets[x].getEndOffset());
int[] termPositions = vector.getTermPositions(0);
assertEquals(0, termPositions[0]);
assertEquals(3, termPositions[1]);
//cleanup
for (Object element : s.createQuery("from " + Employee.class.getName()).list()) s.delete(element);