Added a test for discard and stop buffering