Combine multiple cursor tests as they are so similar