Add terminateEnvironment mock