refactor sandbox test util