@Override
    public String toString() {
        return getClass().getSimpleName() + " barCount: " + barCount;
    }
@Test
    public void naNValuesInIntervall() {
        BarSeries series = new BaseBarSeriesBuilder().withNumTypeOf(numFunction).withName("NaN test").build();
        for (long i = 10; i >= 0; i--) { // (10, NaN, 9, NaN, 8, NaN, 7, NaN)
            Num lowPrice = i % 2 == 0 ? series.numOf(i) : NaN;
            series.addBar(ZonedDateTime.now().plusDays(10 - i), NaN, NaN, lowPrice, NaN, NaN);
        }
        series.addBar(ZonedDateTime.now().plusDays(11), NaN, NaN, series.numOf(10), NaN, NaN);

        AroonDownIndicator aroonDownIndicator = new AroonDownIndicator(series, 5);

        for (int i = series.getBeginIndex(); i <= series.getEndIndex(); i++) {
            if (i % 2 != 0 && i < 11) {
                assertEquals(NaN.toString(), aroonDownIndicator.getValue(i).toString());
            } else if (i < 11)
                assertNumEquals(series.numOf(100).toString(), aroonDownIndicator.getValue(i));
            else
                assertNumEquals(series.numOf(80).toString(), aroonDownIndicator.getValue(i));
        }
    }