public void testLargeGap_3() {
try {
// first get the maximum allowed allowed gap
Series<Double> s = makeSeriesWithGap("2011-05-01", "2011-05-02");
int maxGap = s.getValues(null).asIndexable().getMaxGap();
TimeIndex date1 = s.getFirstObservation(null).getTime();
TimeIndex date2 = date1.add(maxGap + 2 + 1); // a gap too large by 1
Series<Double> s2 = makeSeriesWithGap(date1.toString(), date2.toString());
// force non-sparse time series (should fail because it creates a gap too large by 1)
s2.getValues(null).asIndexable();
expectException();
} catch (Exception e) {
assertException(e, K.T5019);