### Question:
DenseLocalDateDoubleTimeSeries implements ImmutableBean, LocalDateDoubleTimeSeries, Serializable { @Override public LocalDateDoubleTimeSeries subSeries(LocalDate startInclusive, LocalDate endExclusive) { ArgChecker.notNull(startInclusive, "startInclusive"); ArgChecker.notNull(endExclusive, "endExclusive"); if (endExclusive.isBefore(startInclusive)) { throw new IllegalArgumentException( "Invalid sub series, end before start: " + startInclusive + " to " + endExclusive); } if (isEmpty() || startInclusive.equals(endExclusive) || !startDate.isBefore(endExclusive) || startInclusive.isAfter(getLatestDate())) { return LocalDateDoubleTimeSeries.empty(); } LocalDate resolvedStart = dateCalculation.adjustDate(Ordering.natural().max(startInclusive, startDate)); int startIndex = dateCalculation.calculatePosition(startDate, resolvedStart); int endIndex = dateCalculation.calculatePosition(startDate, endExclusive); return new DenseLocalDateDoubleTimeSeries( resolvedStart, Arrays.copyOfRange(points, Math.max(0, startIndex), Math.min(points.length, endIndex)), dateCalculation, true, 0); } private  DenseLocalDateDoubleTimeSeries(
      LocalDate startDate,
      double[] points,
      DenseTimeSeriesCalculation dateCalculation,
      boolean trusted,
      int size); @ImmutableConstructor private  DenseLocalDateDoubleTimeSeries(
      LocalDate startDate,
      double[] points,
      DenseTimeSeriesCalculation dateCalculation); @Override boolean isEmpty(); @Override int size(); @Override boolean containsDate(LocalDate date); @Override OptionalDouble get(LocalDate date); @Override LocalDate getLatestDate(); @Override double getLatestValue(); @Override LocalDateDoubleTimeSeries subSeries(LocalDate startInclusive, LocalDate endExclusive); @Override LocalDateDoubleTimeSeries headSeries(int numPoints); @Override LocalDateDoubleTimeSeries tailSeries(int numPoints); @Override Stream<LocalDateDoublePoint> stream(); @Override DoubleStream values(); @Override Stream<LocalDate> dates(); @Override LocalDateDoubleTimeSeries filter(ObjDoublePredicate<LocalDate> predicate); @Override LocalDateDoubleTimeSeries mapDates(Function<? super LocalDate, ? extends LocalDate> mapper); @Override LocalDateDoubleTimeSeries mapValues(DoubleUnaryOperator mapper); @Override void forEach(ObjDoubleConsumer<LocalDate> action); @Override LocalDateDoubleTimeSeriesBuilder toBuilder(); static DenseLocalDateDoubleTimeSeries.Meta meta(); @Override DenseLocalDateDoubleTimeSeries.Meta metaBean(); LocalDate getStartDate(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void test_subSeries_startAfterEnd() { LocalDateDoubleTimeSeries base = LocalDateDoubleTimeSeries.builder().putAll(DATES_2015_1_WEEK, VALUES_1_WEEK).build(); assertThatIllegalArgumentException().isThrownBy(() -> base.subSeries(date(2011, 1, 2), DATE_2011_01_01)); }