tests for applying a gate