Add tests & add highWaterMark support