Added unit test for resolution of non-adjacent gates