Mocking is a process at development time where the developer intentionally replaces the productive version of functionality in the application with another version, which has a narrowed purpose. Mostly it is useful to mock function A for the testing purpose of function B where B calls A. The constructed mock of A allows to control the execution path inside of B and so to achieve higher code coverage through unit tests.