unit test for Exec()