Introducing graceful termination functionality for mock member