@Test public void testParserOnCurrentTime() throws ParseException, InterruptedException { long now = System.currentTimeMillis(); Thread.sleep(1000); final String timeInstant = "current"; List<Date> time = PARSER.parse(timeInstant); assertEquals(1, time.size()); assertTrue(now < time.get(0).getTime()); }
public List<Date> parse(String value) throws ParseException { Collection results = parser.parse(value); List<Date> dates = (List<Date>) results.stream() .filter(o -> o instanceof Date) .map(o -> (Date) o) .collect(Collectors.toList()); return dates; }
TimeParser { public List<Date> parse(String value) throws ParseException { Collection results = parser.parse(value); List<Date> dates = (List<Date>) results.stream() .filter(o -> o instanceof Date) .map(o -> (Date) o) .collect(Collectors.toList()); return dates; } }
TimeParser { public List<Date> parse(String value) throws ParseException { Collection results = parser.parse(value); List<Date> dates = (List<Date>) results.stream() .filter(o -> o instanceof Date) .map(o -> (Date) o) .collect(Collectors.toList()); return dates; } TimeParser(); }
TimeParser { public List<Date> parse(String value) throws ParseException { Collection results = parser.parse(value); List<Date> dates = (List<Date>) results.stream() .filter(o -> o instanceof Date) .map(o -> (Date) o) .collect(Collectors.toList()); return dates; } TimeParser(); List<Date> parse(String value); }
TimeParser { public List<Date> parse(String value) throws ParseException { Collection results = parser.parse(value); List<Date> dates = (List<Date>) results.stream() .filter(o -> o instanceof Date) .map(o -> (Date) o) .collect(Collectors.toList()); return dates; } TimeParser(); List<Date> parse(String value);  }