### Question:
Ui { public static Builder ui() { return new Builder(); }  static Builder ui();  }### Answer:
@Test void jsonSchemaTest() { final Ui form1 = ui() .withJsonSchema(jsonSchema() .withType("object") .withTitle("Comment") .withProperty("lastname", jsonSchema().withType("string").build()) .withProperty("firstname", jsonSchema().withType("string").build()) .withProperty("age", jsonSchema().withType("number").build()) .build()) .build(); final String json = jsonb.toJson(form1); assertEquals("{\"jsonSchema\":{\"properties\":{\"lastname\":{\"type\":\"string\"}," + "\"firstname\":{\"type\":\"string\"},\"age\":{\"type\":\"number\"}}," + "\"title\":\"Comment\",\"type\":\"object\"}}", json); }
@Test void uiSchemaTest() { final Ui form1 = ui() .withUiSchema(uiSchema() .withKey("multiSelectTag") .withRestricted(false) .withTitle("Simple multiSelectTag") .withDescription("This datalist accepts values that are not in the list of suggestions") .withTooltip("List of suggestions") .withWidget("multiSelectTag") .build()) .build(); final String json = jsonb.toJson(form1); assertEquals("{\"uiSchema\":[{\"description\":\"This datalist accepts values that are not in the list " + "of suggestions\",\"key\":\"multiSelectTag\",\"restricted\":false,\"title\":\"Simple multiSelectTag\"," + "\"tooltip\":\"List of suggestions\",\"widget\":\"multiSelectTag\"}]}", json); }
@Test void propertiesTest() { final Ui form1 = ui().withJsonSchema(JsonSchema.jsonSchemaFrom(Form1.class).build()).withProperties(new Form1()).build(); final String json = jsonb.toJson(form1); assertEquals("{\"jsonSchema\":{\"properties\":{\"name\":{\"type\":\"string\"}},\"title\":\"Form1\"," + "\"type\":\"object\"},\"properties\":{\"name\":\"foo\"}}", json); }