Delegate test

@prachigauriar please review
You’re assuming that task is not `NULL`. A better pattern is to introduce your own local variable (`TSKTask *task`), work with that till the end of the method and assign `task` to `*outTask` if `outTask` isn’t `NULL`.