Refactored all Gate tests