### Question:
TextUtils { public static <T> T readJSON(String json, Class<T> clazz) { try { return MAPPER.readValue(json, clazz); } catch (IOException e) { throw new IllegalStateException(e); } } 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 testReadJSON() { assertEquals(3, TextUtils.readJSON("3", Integer.class).intValue()); assertEquals(Arrays.asList("foo", "bar"), TextUtils.readJSON("[\"foo\", \"bar\"]", List.class)); assertArrayEquals(new float[] { 1.0f, 2.0f }, TextUtils.readJSON("[1,2]", float[].class)); }