### Question:
JSONUtils { public String prepareJSONString(Map<String, String> value) throws IOException { StringWriter stringWriter = new StringWriter(); JsonGenerator jgen = jsonFactory.createJsonGenerator(stringWriter); objectMapper.writeValue(jgen, value); return stringWriter.toString(); } JSONUtils(JsonFactory jsonFactory, ObjectMapper objectMapper); String prepareJSONString(Map<String, String> value);  }### Answer:
@Test(dataProvider = "prepareJSONStringDataProvider") public void testPrepareJSONString( Map<String, String> willBeConverted, String expectedResultOfConvert) throws IOException { String actualResultOfConvert = jsonUtils.prepareJSONString(willBeConverted); Assert.assertEquals(actualResultOfConvert, expectedResultOfConvert); }