@Test public void shouldCreateJsonValue() { List<String> list = new ArrayList<String>(); list.add("LIST_VALUE_1"); list.add("LIST_VALUE_2"); list.add("LIST_VALUE_3"); Map<String, String> map = new LinkedHashMap<String, String>(); map.put("MAP_KEY_1", "MAP_VALUE_1"); map.put("MAP_KEY_2", "MAP_VALUE_2"); map.put("MAP_KEY_3", "MAP_VALUE_3"); Map<String, String> mapParam = new LinkedHashMap<String, String>(); mapParam.put("MAP_PARAM_KEY_1", "MAP_PARAM_VALUE_1"); mapParam.put("MAP_PARAM_KEY_2", "MAP_PARAM_VALUE_2"); JsonValue jsonValueParam1 = new JsonValue(mapParam); List<String> listParam = new ArrayList<String>(); listParam.add("LIST_PARAM_VALUE_1"); listParam.add("LIST_PARAM_VALUE_2"); JsonValue jsonValueParam2 = new JsonValue(listParam); JsonValue jsonValue = JsonValueBuilder.jsonValue() .put("KEY1", 1) .put("KEY2", 4L) .put("KEY3", 34.56) .put("KEY4", list) .put("KEY5", map) .put("KEY6", "VALUE") .put("KEY7", jsonValueParam1) .put("KEY8", jsonValueParam2) .array("KEY9") .add("KEY9_VALUE_1") .addLast("KEY9_VALUE_2") .build(); JsonValue expectedJsonValue = getExpectedJsonValue(); assertEquals(jsonValue.toString(), expectedJsonValue.toString()); }
public static JsonObject jsonValue() { return new JsonObject(); }
JsonValueBuilder { public static JsonObject jsonValue() { return new JsonObject(); } }
JsonValueBuilder { public static JsonObject jsonValue() { return new JsonObject(); }  }
JsonValueBuilder { public static JsonObject jsonValue() { return new JsonObject(); }  static JsonObject jsonValue(); static JsonValue toJsonValue(String json); static ObjectMapper getObjectMapper(); }
JsonValueBuilder { public static JsonObject jsonValue() { return new JsonObject(); }  static JsonObject jsonValue(); static JsonValue toJsonValue(String json); static ObjectMapper getObjectMapper();  }