refactor integrated testing