Added callbacks 'onAfterSuccess' and 'onAfterComplete' that can be used in tests to check specific conditions.