Add test cases for T457

(fixes #457)