@Test public void branch_with_project() throws JsonProcessingException { Project project = Project.of(new NameDescription("PRJ", "Project")).withSignature(SIGNATURE); Branch branch = Branch.of(project, new NameDescription("B", "Branch")).withSignature(SIGNATURE); assertJsonWrite( object() .with("id", 0) .with("name", "B") .with("description", "Branch") .with("disabled", false) .with("type", "CLASSIC") .with("project", object() .with("id", 0) .with("name", "PRJ") .with("description", "Project") .with("disabled", false) .with("signature", SIGNATURE_OBJECT) .end()) .with("signature", SIGNATURE_OBJECT) .end(), branch, Branch.class ); }
public static Branch of(Project project, NameDescription nameDescription) { return of(project, nameDescription.asState()); }
Branch implements ProjectEntity { public static Branch of(Project project, NameDescription nameDescription) { return of(project, nameDescription.asState()); } }
Branch implements ProjectEntity { public static Branch of(Project project, NameDescription nameDescription) { return of(project, nameDescription.asState()); }  }
Branch implements ProjectEntity { public static Branch of(Project project, NameDescription nameDescription) { return of(project, nameDescription.asState()); }  static Branch of(Project project, NameDescription nameDescription); static Branch of(Project project, NameDescriptionState nameDescription); @Override ProjectEntityType getProjectEntityType(); @Override String getEntityDisplayName(); Branch withId(ID id); static Form form(); Form toForm(); Branch update(NameDescriptionState form); }
Branch implements ProjectEntity { public static Branch of(Project project, NameDescription nameDescription) { return of(project, nameDescription.asState()); }  static Branch of(Project project, NameDescription nameDescription); static Branch of(Project project, NameDescriptionState nameDescription); @Override ProjectEntityType getProjectEntityType(); @Override String getEntityDisplayName(); Branch withId(ID id); static Form form(); Form toForm(); Branch update(NameDescriptionState form);  }