Add tests for sample mode