JsonHelper { public <T> T unmarshallJsonToObject(Class<T> classType, String jsonContent) throws IOException { return new ObjectMapper().readValue(jsonContent, classType); }  T getKeyValue(JSONObject jsonObject, Object key, Class<T> classType); String objectToJson(Object object); List<T> unmarshallJsonToListOfObjects(Class<T> classType, String jsonContent); T unmarshallJsonToObject(Class<T> classType, String jsonContent);  }
@Test public void testUnmarshallJsonToObject() throws IOException { assertEquals(STRING_VALUE, jsonHelper.unmarshallJsonToObject(String.class, String.format("\"%s\"", STRING_VALUE))); }