typeahead.index(conn);
}
}
public void testSimpleNetwork() throws Exception {
SimpleElement element;
// Index elements: 1, 11, 12, 13, 111, 112, 121, 131
element = new SimpleElement(1);
element.setScore(rand.nextFloat());
element.setTimestamp(System.currentTimeMillis());
element.setTerms(new String[]{"001", "professor", "linkedin"});
typeahead.index(element);
element = new SimpleElement(11);
element.setScore(rand.nextFloat());
element.setTimestamp(System.currentTimeMillis());
element.setTerms(new String[]{"011", "college", "student", "linkedin"});
typeahead.index(element);
element = new SimpleElement(12);
element.setScore(rand.nextFloat());
element.setTimestamp(System.currentTimeMillis());
element.setTerms(new String[]{"012", "college", "student", "linkedin"});
typeahead.index(element);
element = new SimpleElement(13);
element.setScore(rand.nextFloat());
element.setTimestamp(System.currentTimeMillis());
element.setTerms(new String[]{"013", "university", "student", "linkedin"});
typeahead.index(element);
element = new SimpleElement(111);
element.setScore(rand.nextFloat());
element.setTimestamp(System.currentTimeMillis());
element.setTerms(new String[]{"111", "arts", "linkedin"});
typeahead.index(element);
element = new SimpleElement(112);
element.setScore(rand.nextFloat());
element.setTimestamp(System.currentTimeMillis());
element.setTerms(new String[]{"112", "art", "linkedin"});
typeahead.index(element);
element = new SimpleElement(121);
element.setScore(rand.nextFloat());
element.setTimestamp(System.currentTimeMillis());
element.setTerms(new String[]{"121", "art", "linkedin"});
typeahead.index(element);
element = new SimpleElement(131);
element.setScore(rand.nextFloat());
element.setTimestamp(System.currentTimeMillis());
element.setTerms(new String[]{"131", "business", "linkedin"});
typeahead.index(element);
/**
* Index connections:
* 001 -> 011