Gendreau06Parser { public Gendreau06Parser filter(GendreauProblemClass... classes) { problemClasses = Optional.of(ImmutableList.<ProblemClass>copyOf(classes)); return this; } private  Gendreau06Parser(); static Gendreau06Parser parser(); static Gendreau06Scenario parse(File file); static Function<Path, Gendreau06Scenario> reader(); Gendreau06Parser addFile(File file); Gendreau06Parser addFile(String file); Gendreau06Parser addFile(InputStream stream, String fileName); Gendreau06Parser addFile(ImmutableList<AddParcelEvent> events,
      String fileName); Gendreau06Parser addDirectory(String dir); Gendreau06Parser addDirectory(File dir); Gendreau06Parser allowDiversion(); Gendreau06Parser offline(); Gendreau06Parser realtime(); Gendreau06Parser setNumVehicles(int num); Gendreau06Parser setNumParcels(int num); Gendreau06Parser setTickSize(long tick); Gendreau06Parser filter(GendreauProblemClass... classes); ImmutableList<Gendreau06Scenario> parse(); Function<Path, Gendreau06Scenario> asParseFunction();  }
@Test public void filterTest() { assertTrue(parser().filter(GendreauProblemClass.LONG_LOW_FREQ) .addFile(FILE_PATH).parse().isEmpty()); assertEquals(1, parser().filter(GendreauProblemClass.SHORT_LOW_FREQ) .addFile(FILE_PATH).parse().size()); assertEquals(1, parser().filter(GendreauProblemClass.LONG_LOW_FREQ, GendreauProblemClass.SHORT_LOW_FREQ) .addFile(FILE_PATH).parse().size()); assertEquals(1, parser().filter(GendreauProblemClass.values()) .addFile(FILE_PATH).parse().size()); }