### Question:
SparseLocalDateDoubleTimeSeries implements ImmutableBean, Serializable, LocalDateDoubleTimeSeries { static SparseLocalDateDoubleTimeSeries of(Collection<LocalDate> dates, Collection<Double> values) { ArgChecker.noNulls(dates, "dates"); ArgChecker.noNulls(values, "values"); LocalDate[] datesArray = dates.toArray(new LocalDate[dates.size()]); double[] valuesArray = Doubles.toArray(values); validate(datesArray, valuesArray); return createUnsafe(datesArray, valuesArray); } @ImmutableConstructor private  SparseLocalDateDoubleTimeSeries(LocalDate[] dates, double[] values); private  SparseLocalDateDoubleTimeSeries(LocalDate[] dates, double[] values, boolean trusted); @Override int size(); @Override boolean isEmpty(); @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 Stream<LocalDate> dates(); @Override DoubleStream values(); @Override void forEach(ObjDoubleConsumer<LocalDate> action); @Override LocalDateDoubleTimeSeries mapDates(Function<? super LocalDate, ? extends LocalDate> mapper); @Override LocalDateDoubleTimeSeries mapValues(DoubleUnaryOperator mapper); @Override LocalDateDoubleTimeSeries filter(ObjDoublePredicate<LocalDate> predicate); @Override LocalDateDoubleTimeSeriesBuilder toBuilder(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static SparseLocalDateDoubleTimeSeries.Meta meta(); @Override SparseLocalDateDoubleTimeSeries.Meta metaBean();  }### Answer:
@Test public void test_of_singleton_nullDateDisallowed() { assertThatIllegalArgumentException().isThrownBy(() -> LocalDateDoubleTimeSeries.of(null, 1d)); }
@Test public void test_of_collectionCollection_sparse_differentSize() { List<LocalDate> dates = ImmutableList.of(DATE_2011_01_01, DATE_2011_06_01); List<Double> values = ImmutableList.of(1d); assertThatIllegalArgumentException().isThrownBy(() -> SparseLocalDateDoubleTimeSeries.of(dates, values)); }
@Test public void test_equals_notEqual() { LocalDateDoubleTimeSeries series1 = LocalDateDoubleTimeSeries.of(DATE_2014_01_01, 1d); LocalDateDoubleTimeSeries series2 = LocalDateDoubleTimeSeries.of(DATE_2013_06_01, 1d); LocalDateDoubleTimeSeries series3 = LocalDateDoubleTimeSeries.of(DATE_2014_01_01, 3d); assertThat(series1).isNotEqualTo(series2); assertThat(series1).isNotEqualTo(series3); }
@Test public void coverage() { List<LocalDate> dates = ImmutableList.of(DATE_2011_01_01, DATE_2011_06_01); List<Double> values = ImmutableList.of(1d, 2d); SparseLocalDateDoubleTimeSeries test = SparseLocalDateDoubleTimeSeries.of(dates, values); coverImmutableBean(test); List<LocalDate> dates2 = ImmutableList.of(DATE_2011_06_01, DATE_2012_01_01); List<Double> values2 = ImmutableList.of(2d, 3d); SparseLocalDateDoubleTimeSeries test2 = SparseLocalDateDoubleTimeSeries.of(dates2, values2); coverBeanEquals(test, test2); }