### Question:
VWAP extends SingleValueIndicator { public VWAP(int length, TimeInterval interval) { super(interval, c -> ((c.high + c.low + c.close) / 3.0) * c.volume); typicalPrice = new CircularList(length); volume = new CircularList(length); } VWAP(int length, TimeInterval interval); @Override double getValue();  }### Answer:
@Test public void vwap() { VWAP vwap = new VWAP(5, minutes(1)); accumulateAndReturn(vwap, 0); accumulateAndReturn(vwap, 1); accumulateAndReturn(vwap, 2); accumulateAndReturn(vwap, 3); accumulateAndReturn(vwap, 4); assertEquals(45.1453, accumulateAndReturn(vwap, 5), 0.001); assertEquals(45.1513, accumulateAndReturn(vwap, 6), 0.001); assertEquals(45.1413, accumulateAndReturn(vwap, 7), 0.001); assertEquals(45.1547, accumulateAndReturn(vwap, 8), 0.001); assertEquals(45.1967, accumulateAndReturn(vwap, 9), 0.001); assertEquals(45.2560, accumulateAndReturn(vwap, 10), 0.001); assertEquals(45.3340, accumulateAndReturn(vwap, 11), 0.001); assertEquals(45.4060, accumulateAndReturn(vwap, 12), 0.001); assertEquals(45.3880, accumulateAndReturn(vwap, 13), 0.001); assertEquals(45.2120, accumulateAndReturn(vwap, 14), 0.001); assertEquals(44.9267, accumulateAndReturn(vwap, 15), 0.001); assertEquals(44.5033, accumulateAndReturn(vwap, 16), 0.001); assertEquals(44.0840, accumulateAndReturn(vwap, 17), 0.001); assertEquals(43.8247, accumulateAndReturn(vwap, 18), 0.001); }