Port tests from Katana.