Added mocks handling