# Mocking CountResponse in NEST 7.2.0

**URL:** <https://discuss.elastic.co/t/mocking-countresponse-in-nest-7-2-0/199995>\
**Category:** Elasticsearch\
**Created:** [September 18, 2019, 11:54am UTC](https://discuss.elastic.co/t/mocking-countresponse-in-nest-7-2-0/199995 "2019-09-18T11:54:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mktd](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@mktd](https://discuss.elastic.co/u/mktd)\
**Post date:** [September 18, 2019, 11:54am UTC](https://discuss.elastic.co/t/mocking-countresponse-in-nest-7-2-0/199995/1 "2019-09-18T11:54:46Z")

</div>

Hi!

Our company are currently upgrading from NEST 6.4.2 to 7.2.0, and we've come across some breaking changes. We are using the Count-method, and in earlier versions this was virtual and possible to mock. Now, this method has been made non-virtual. Any idea of how I am supposed to mock this in my unit tests now?

Appreciate any help.

Regards,  
Marianne

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 16, 2019, 11:54am UTC](https://discuss.elastic.co/t/mocking-countresponse-in-nest-7-2-0/199995/2 "2019-10-16T11:54:46Z")

</div>

Closed on October 16, 2019, 11:54am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
