### Question:
Project implements ProjectEntity { public static Form form() { return Form.nameAndDescription() .with( YesNo.of("disabled").label("Disabled").help("Check if the project must be disabled.") ); }  Project withId(ID id); static Project of(NameDescriptionState nameDescription); static Project of(NameDescription nameDescription); @Override Project getProject(); @Override ProjectEntityType getProjectEntityType(); @Override String getEntityDisplayName(); static Form form(); Project update(NameDescriptionState form); Form asForm();  }### Answer:
@Test public void new_form() throws JsonProcessingException { assertJsonWrite( object() .with("fields", array() .with(object() .with("type", "text") .with("name", "name") .with("label", "Name") .with("required", true) .with("readOnly", false) .with("validation", "Name is required and must contain only alpha-numeric characters, underscores, points or dashes.") .with("help", "") .withNull("value") .with("length", 40) .with("regex", "[A-Za-z0-9_\\.\\-]+") .end()) .with(object() .with("type", "memo") .with("name", "description") .with("label", "Description") .with("required", false) .with("readOnly", false) .with("validation", (String) null) .with("help", "") .withNull("value") .with("length", 500) .with("rows", 3) .end()) .with(object() .with("type", "yesno") .with("name", "disabled") .with("label", "Disabled") .with("required", true) .with("readOnly", false) .with("validation", (String) null) .with("help", "Check if the project must be disabled.") .withNull("value") .end()) .end()) .end(), Project.form() ); }