Move invariant related tests into a new file and add more cases.
Fix year in disclaimer.
Add more cases
Merge pull request #734 from zhenyao/invariant

Invariant