### Question:
DenseLocalDateDoubleTimeSeries implements ImmutableBean, LocalDateDoubleTimeSeries, Serializable { @Override public LocalDateDoubleTimeSeries headSeries(int numPoints) { ArgChecker.notNegative(numPoints, "numPoints"); if (numPoints == 0) { return LocalDateDoubleTimeSeries.empty(); } else if (numPoints > size()) { return this; } int endPosition = findHeadPoints(numPoints); return new DenseLocalDateDoubleTimeSeries(startDate, Arrays.copyOf(points, endPosition), dateCalculation); } 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_headSeries_negative() { LocalDateDoubleTimeSeries base = LocalDateDoubleTimeSeries.builder().putAll(DATES_2015_1_WEEK, VALUES_1_WEEK).build(); assertThatIllegalArgumentException().isThrownBy(() -> base.headSeries(-1)); }