AgendaItemBo implements AgendaItemDefinitionContract, Versioned, Serializable { public String getUlHelper(AgendaItemBo item) { StringBuilder sb = new StringBuilder(); sb.append("<li>" + getRuleId() + "</li>"); if (whenTrue != null) { sb.append("<ul><li>when true</li><ul>"); sb.append(getUlHelper(whenTrue)); sb.append("</ul></ul>"); } if (whenFalse != null) { sb.append("<ul><li>when false</li><ul>"); sb.append(getUlHelper(whenFalse)); sb.append("</ul></ul>"); } if (always != null) { sb.append(getUlHelper(always)); } return sb.toString(); }  String getUl(AgendaItemBo firstItem); String getUlHelper(AgendaItemBo item); String getRuleText(); List<AgendaItemBo> getAlwaysList(); @Override String getId(); void setId(String id); @Override String getAgendaId(); void setAgendaId(String agendaId); @Override String getRuleId(); @Override String getSubAgendaId(); void setSubAgendaId(String subAgendaId); @Override String getWhenTrueId(); void setWhenTrueId(String whenTrueId); @Override String getWhenFalseId(); void setWhenFalseId(String whenFalseId); @Override String getAlwaysId(); void setAlwaysId(String alwaysId); @Override Long getVersionNumber(); void setVersionNumber(Long versionNumber); @Override AgendaItemBo getWhenTrue(); void setWhenTrue(AgendaItemBo whenTrue); @Override AgendaItemBo getWhenFalse(); void setWhenFalse(AgendaItemBo whenFalse); @Override AgendaItemBo getAlways(); void setAlways(AgendaItemBo always); @Override RuleBo getRule(); @Override AgendaDefinitionContract getSubAgenda(); void setRule(RuleBo rule); static AgendaItemBo from(AgendaItemDefinition im); AgendaItemBo copyAgendaItem(AgendaBo copiedAgenda, Map<String, RuleBo> oldRuleIdToNew, Map<String, AgendaItemBo> oldAgendaItemIdToNew, List<AgendaItemBo> copiedAgendaItems, final String dts); DataObjectService getDataObjectService(); void setDataObjectService(DataObjectService dataObjectService); KrmsTypeRepositoryService getKrmsTypeRepositoryService(); void setKrmsTypeRepositoryService(KrmsTypeRepositoryService dataObjectService); static final String COPY_OF_TEXT; static final String AGENDA_ITEM_SEQ_NAME; }
@Test public void testGetUlHelper() { AgendaItemBo obj = new AgendaItemBo(); testObject.setAgendaId("B"); testObject.setId("A"); testObject.setVersionNumber(0L); testObject.setRule(getRuleBo("ID", "NAME", "NAMESPACE", "DESCRIPTION", null)); testObject.setSubAgendaId("D"); String result = testObject.getUlHelper(obj); assertEquals("<li>ID</li>",result); }