CovarianceCalculator implements Function<DoubleTimeSeries<?>, Double> { protected void testTimeSeries(final DoubleTimeSeries<?> ts1, final DoubleTimeSeries<?> ts2) { testTimeSeriesSize(ts1, 2); testTimeSeriesSize(ts2, 2); testTimeSeriesDates(ts1, ts2); }    }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullTS1() { CALCULATOR.testTimeSeries(null, TS1); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullTS2() { CALCULATOR.testTimeSeries(TS2, null); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testEmptyTS1() { CALCULATOR.testTimeSeries(ImmutableInstantDoubleTimeSeries.EMPTY_SERIES, TS1); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testEmptyTS2() { CALCULATOR.testTimeSeries(TS2, ImmutableInstantDoubleTimeSeries.EMPTY_SERIES); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testSmallTS1() { CALCULATOR.testTimeSeries(TS1, TS2); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testSmallTS2() { CALCULATOR.testTimeSeries(TS2, TS1); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testDifferentLength() { CALCULATOR.testTimeSeries(TS2, TS4); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testDifferentDates() { CALCULATOR.testTimeSeries(TS2, TS3); }