Predicate<String> predicate;
String searchfor;
String entry;
searchfor = "b";
predicate = new PredicateLessThan(searchfor, true);
entry = "a";
assertTrue(predicate.apply(entry));
searchfor = "a";
predicate = new PredicateLessThan(searchfor, true);
entry = "b";
assertFalse(predicate.apply(entry));
searchfor = "a";
predicate = new PredicateLessThan(searchfor, true);
entry = null;
assertFalse(predicate.apply(entry));
// equality matching
searchfor = "2012-11-25T21:00:45.967-07:00";
entry = "2012-11-25T21%3A00%3A45.967-07%3A00";
predicate = new PredicateLessThan(searchfor, true);
assertTrue("this should have matched the equality flag", predicate.apply(entry));
}