### Question:
AroonDownIndicator extends CachedIndicator<Num> { @Override public String toString() { return getClass().getSimpleName() + " barCount: " + barCount; } AroonDownIndicator(Indicator<Num> minValueIndicator, int barCount);  AroonDownIndicator(BarSeries series, int barCount); @Override String toString();  }### Answer:
@Test public void onlyNaNValues() { BarSeries series = new BaseBarSeriesBuilder().withNumTypeOf(numFunction).withName("NaN test").build(); for (long i = 0; i <= 1000; i++) { series.addBar(ZonedDateTime.now().plusDays(i), NaN, NaN, NaN, NaN, NaN); } AroonDownIndicator aroonDownIndicator = new AroonDownIndicator(series, 5); for (int i = series.getBeginIndex(); i <= series.getEndIndex(); i++) { assertEquals(NaN.toString(), aroonDownIndicator.getValue(i).toString()); } }
@Test public void naNValuesInIntervall() { BarSeries series = new BaseBarSeriesBuilder().withNumTypeOf(numFunction).withName("NaN test").build(); for (long i = 10; i >= 0; i--) { Num minPrice = i % 2 == 0 ? series.numOf(i) : NaN; series.addBar(ZonedDateTime.now().plusDays(10 - i), NaN, NaN, minPrice, 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)); } }