public void dateTimeIsBeforeTest() {
StringBuilder sb = new StringBuilder();
Session s = Factory.getSession();
Database currDb = s.getCurrentDatabase();
View threadsByDate = currDb.getView("AllThreadsByDate");
ViewNavigator vNav = threadsByDate.createViewNav();
vNav.setEntryOptions(org.openntf.domino.ViewNavigator.VN_ENTRYOPT_NOCOLUMNVALUES);
Random randomGenerator = new Random();
int randomInt = randomGenerator.nextInt(20);
ViewEntry firstEnt = vNav.getNth(randomInt);
while (!firstEnt.isDocument()) {
firstEnt = vNav.getNext();
}
randomInt = randomGenerator.nextInt(20);
ViewEntry secondEnt = vNav.getNth(randomInt);
while (!secondEnt.isDocument()) {
secondEnt = vNav.getNext();
}
Document firstDoc = firstEnt.getDocument();
Document secondDoc = secondEnt.getDocument();
String firstDt = firstDoc.getFirstItem("Date").getText();
String secondDt = secondDoc.getFirstItem("Date").getText();