AgendaItemBo implements AgendaItemDefinitionContract, Versioned, Serializable { public String getRuleText() { StringBuilder resultBuilder = new StringBuilder(); if (getRule() != null) { if (StringUtils.isBlank(getRule().getName())) { resultBuilder.append("- unnamed rule -"); } else { resultBuilder.append(getRule().getName()); } if (!StringUtils.isBlank(getRule().getDescription())) { resultBuilder.append(": "); resultBuilder.append(getRule().getDescription()); } if (!CollectionUtils.isEmpty(getRule().getActions())) { resultBuilder.append(" ["); ActionBo action = getRule().getActions().get(0); KrmsTypeDefinition krmsTypeDefn = getKrmsTypeRepositoryService().getTypeById(action.getTypeId()); resultBuilder.append(krmsTypeDefn.getName()); resultBuilder.append(": "); resultBuilder.append(action.getName()); if (getRule().getActions().size() > 1) { resultBuilder.append(" ... "); } resultBuilder.append("]"); } } else { throw new IllegalStateException(); } return resultBuilder.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(expected = IllegalStateException.class) public void testGetRuleTextInvalidParameter(){ testObject.getRuleText(); }