Delegate test

@prachigauriar please review
Conventionally, we name these `outTask` and `outError` to make clear that their values are being returned indirectly.