refactor ifOnEdgeBounceTest