Add tests for the run() function