Refactoring of mocks initialization.