### Question:
TextUtils { public static <T> T convertViaJSON(Object value, Class<T> clazz) { return MAPPER.convertValue(value, clazz); } private  TextUtils(); static String[] parseDelimited(String delimited, char delimiter); static String[] parsePMMLDelimited(String delimited); static String joinDelimited(Iterable<?> elements, char delimiter); static String joinPMMLDelimited(Iterable<?> elements); static String joinPMMLDelimitedNumbers(Iterable<? extends Number> elements); static String[] parseJSONArray(String json); static String joinJSON(Iterable<?> elements); static T readJSON(String json, Class<T> clazz); static T convertViaJSON(Object value, Class<T> clazz);  }### Answer:
@Test public void testConvertViaJSON() { assertEquals(3, TextUtils.convertViaJSON("3", Long.class).longValue()); assertArrayEquals(new float[] { 1.0f, 2.0f }, TextUtils.convertViaJSON(new double[] { 1.0, 2.0 }, float[].class)); }