What is the purpose of mocking in test automation?

Technical