From 9f438d312cb84fcc4241d65699a982b1a95a5903 Mon Sep 17 00:00:00 2001 From: Bhavana Ramaram Date: Thu, 16 Nov 2023 23:20:21 +0530 Subject: [PATCH] change XContentFactory to MediaTypeRegistry builder in MLRegisterModelInputTest class Signed-off-by: Bhavana Ramaram --- .../ml/common/transport/register/MLRegisterModelInputTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/test/java/org/opensearch/ml/common/transport/register/MLRegisterModelInputTest.java b/common/src/test/java/org/opensearch/ml/common/transport/register/MLRegisterModelInputTest.java index ee95447f62..6de3788243 100644 --- a/common/src/test/java/org/opensearch/ml/common/transport/register/MLRegisterModelInputTest.java +++ b/common/src/test/java/org/opensearch/ml/common/transport/register/MLRegisterModelInputTest.java @@ -277,7 +277,7 @@ public void testMCorrInput() throws IOException { .deployModel(true) .modelNodeIds(new String[]{"modelNodeIds" }) .build(); - XContentBuilder builder = XContentFactory.jsonBuilder(); + XContentBuilder builder = MediaTypeRegistry.contentBuilder(XContentType.JSON); mcorrInput.toXContent(builder, ToXContent.EMPTY_PARAMS); String jsonStr = builder.toString(); assertEquals(testString, jsonStr);