# Replacement of NamedXContentRegistry in Java API Client

**URL:** <https://discuss.elastic.co/t/replacement-of-namedxcontentregistry-in-java-api-client/355209>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [March 12, 2024, 7:50am UTC](https://discuss.elastic.co/t/replacement-of-namedxcontentregistry-in-java-api-client/355209 "2024-03-12T07:50:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![roypiyali92](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roypiyali92/32/132548_2.png) [@roypiyali92](https://discuss.elastic.co/u/roypiyali92)\
**Post date:** [March 12, 2024, 7:50am UTC](https://discuss.elastic.co/t/replacement-of-namedxcontentregistry-in-java-api-client/355209/1 "2024-03-12T07:50:59Z")

</div>

I am using the Java Api Client and need to write Mockito Test Cases where I can read a Json file and convert it into a SearchResponse Object . With the High Level Rest Client this was possible using the NamedXContentRegistry . How can I achieve this using Java API Client .

---

<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:** [April 9, 2024, 7:51am UTC](https://discuss.elastic.co/t/replacement-of-namedxcontentregistry-in-java-api-client/355209/2 "2024-04-09T07:51:26Z")

</div>

Closed on April 9, 2024, 7:51am UTC

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