@Test public void passesInputDataToIndicator() { when(indicator.indicate(any(BasicMarketData.class))).thenReturn(empty()); cut.indicate(SOME_MARKET_DATA); verify(indicator).indicate(SOME_MARKET_DATA); cut.indicate(OTHER_MARKET_DATA); verify(indicator).indicate(OTHER_MARKET_DATA); }
@Override public Optional<V> indicate(final MP marketPrice) { return indicator.indicate(marketPrice).flatMap(value -> smoother.smooth(value)); }
IndicatorSmoother implements Indicator<V, MP> { @Override public Optional<V> indicate(final MP marketPrice) { return indicator.indicate(marketPrice).flatMap(value -> smoother.smooth(value)); } }
IndicatorSmoother implements Indicator<V, MP> { @Override public Optional<V> indicate(final MP marketPrice) { return indicator.indicate(marketPrice).flatMap(value -> smoother.smooth(value)); } IndicatorSmoother(final Indicator<V, MP> indicator, final Smoother<V> smoother); }
IndicatorSmoother implements Indicator<V, MP> { @Override public Optional<V> indicate(final MP marketPrice) { return indicator.indicate(marketPrice).flatMap(value -> smoother.smooth(value)); } IndicatorSmoother(final Indicator<V, MP> indicator, final Smoother<V> smoother); @Override Optional<V> indicate(final MP marketPrice); }
IndicatorSmoother implements Indicator<V, MP> { @Override public Optional<V> indicate(final MP marketPrice) { return indicator.indicate(marketPrice).flatMap(value -> smoother.smooth(value)); } IndicatorSmoother(final Indicator<V, MP> indicator, final Smoother<V> smoother); @Override Optional<V> indicate(final MP marketPrice);  }