JsonBuilder { public JsonValue build() { if ( builtValue == null ) { if ( objects.isEmpty() && arrays.isEmpty() ) throw new JsonException("Alignment error: no object or array started") ; throw new JsonException("Alignment error: unfinished outer object or array") ; } return builtValue ; } JsonBuilder(); static JsonBuilder create(); static JsonBuilder createFrom(JsonValue arg); static JsonValue copy(JsonValue arg); static JsonObject buildObject(Consumer<JsonBuilder> setup); JsonValue build(); void reset(); JsonBuilder startObject(); JsonBuilder startObject(String startMarker); JsonBuilder finishObject(); JsonBuilder finishObject(String finishMarker); JsonBuilder startArray(); JsonBuilder finishArray(); JsonBuilder pair(String key, JsonValue value); JsonBuilder pair(String key, boolean value); JsonBuilder pair(String key, BigDecimal value); JsonBuilder pair(String key, double value); JsonBuilder pair(String key, long value); JsonBuilder pair(String key, String value); JsonBuilder key(String key); JsonBuilder value(JsonValue v); JsonBuilder value(boolean b); JsonBuilder value(BigDecimal decimal); JsonBuilder value(double d); JsonBuilder value(long val); JsonBuilder valueNull(); JsonBuilder value(String string);  }
@Test(expected=JsonException.class) public void jsonBuildErr00() { JsonBuilder builder = new JsonBuilder() ; JsonValue v = builder.build() ; }