assertEquals(50.0, wnd.rate(), 0.0001);
}
@Test
public void testWindowSlideOutOfHorizon() throws Exception {
RateAggregate wnd = new RateAggregate(100, -1);
testUtil.mockCurrentTimeMillis(0, 0, 50, 50, 100, 100, 1500);
wnd.feed(100);
wnd.feed(150);
wnd.feed(200);
assertEquals(-1.0, wnd.rate(), 0.0001);
}