### Question:
CashFlow implements Indicator<Decimal> { public int getSize() { return timeSeries.getTickCount(); } CashFlow(TimeSeries timeSeries, Trade trade);  CashFlow(TimeSeries timeSeries, TradingRecord tradingRecord); @Override Decimal getValue(int index); @Override TimeSeries getTimeSeries(); int getSize();  }### Answer:
@Test public void cashFlowSize() { TimeSeries sampleTimeSeries = new MockTimeSeries(1d, 2d, 3d, 4d, 5d); CashFlow cashFlow = new CashFlow(sampleTimeSeries, new BaseTradingRecord()); assertEquals(5, cashFlow.getSize()); }
@Test public void cashFlowSize() { TimeSeries sampleTimeSeries = new MockTimeSeries(1d, 2d, 3d, 4d, 5d); CashFlow cashFlow = new CashFlow(sampleTimeSeries, new TradingRecord()); assertEquals(5, cashFlow.getSize()); }