Tests for defer and deferonce

Remove Todo