Add several more test cases for invariants.