refactor testCannotReturn