Add a test: testSmartBuffer::setWatermarkIfNeeded().