Use mock for test hook called