@Test public void testCreateObject() throws Exception { Distribution distribution = new Distribution(); List<Rule> rules = new ArrayList<>(); for (int i = 0; i < 5; i++) { Rule rule = new Rule(); rule.setPercent(i); Server serv = new Server(); serv.setName("name" + i); serv.setPath("path" + i); serv.setUrl("url" + i); rule.setServer(serv); rules.add(rule); } distribution.setRules(rules); String result = serializeIt(distribution, true); System.out.println(result); assertNotNull(result); }
public void setRules(List<Rule> rules) { this.rules = rules; }
Distribution extends VisitableExpression implements java.io.Serializable, Expressions { public void setRules(List<Rule> rules) { this.rules = rules; } }
Distribution extends VisitableExpression implements java.io.Serializable, Expressions { public void setRules(List<Rule> rules) { this.rules = rules; } Distribution(); }
Distribution extends VisitableExpression implements java.io.Serializable, Expressions { public void setRules(List<Rule> rules) { this.rules = rules; } Distribution(); static Distribution newInstance(Distribution distribution); List<Rule> getRules(); void setRules(List<Rule> rules); void addRule(Rule rule); Server getDefaultServer(); void setDefaultServer(Server server); @Override boolean equals(Object o); @Override int hashCode(); }
Distribution extends VisitableExpression implements java.io.Serializable, Expressions { public void setRules(List<Rule> rules) { this.rules = rules; } Distribution(); static Distribution newInstance(Distribution distribution); List<Rule> getRules(); void setRules(List<Rule> rules); void addRule(Rule rule); Server getDefaultServer(); void setDefaultServer(Server server); @Override boolean equals(Object o); @Override int hashCode();  }