What Invariance Is and How to Test for It