Add new tests to cover payment states.
Fix more tests.