Add unit test for moving average