JsonUtil { public static ObjectNode createNode( String key, Object value ) { return objectNode().put( key, value.toString() ); } private  JsonUtil(); static ObjectNode objectNode(); static ObjectNode createNode( String key, Object value ); static String toJson( Object value ); static T fromJson( String json, Class<T> type ); static byte[] toCbor( Object value ); static T fromCbor( byte data[], Class<T> type ); static void addAll( ArrayNode arr, Collection<String> list ); static final ObjectMapper MAPPER; }
@Test public void testCreate() throws IOException { ObjectNode person = JsonUtil.createNode( "name", "Subutai" ); assertNotNull( person ); assertEquals( "Subutai", person.get( "name" ).asText() ); }