CompositeParser implements Parser { static CompositeParser of(Parser... parsers) { if (parsers == null || parsers.length == 0) throw new IllegalArgumentException("Unable to create CompositeParser"); return new CompositeParser(Arrays.asList(parsers)); } private  CompositeParser(List<Parser> delegates); @Override Optional<Schedule> parse(String scheduleString); @Override List<String> examples();  }
@Test public void fails_when_no_successful_parsers() { assertScheduleNotPresent(CompositeParser.of(NON_MATCHING_PARSER, ANOTHER_NON_MATCHING_PARSER), ANY_SCHEDULE_STRING); }