GuidedDTDRLPersistence { String getName(GuidedDecisionTable52 dt, List<DTCellValue52> row, Number num) { final DTCellValue52 ruleNameValue = row.get(RULE_NAME_COLUMN_INDEX); if (hasStringValue(ruleNameValue)) { return ruleNameValue.getStringValue(); } else { return String.format("Row %d %s", num.longValue(), dt.getTableName()); } }  static GuidedDTDRLPersistence getInstance(); String marshal(final GuidedDecisionTable52 originalDTable);  }
@Test public void testName() { GuidedDTDRLPersistence p = new GuidedDTDRLPersistence(); GuidedDecisionTable52 dt = new GuidedDecisionTable52(); dt.setTableName("My table"); dt.setData(DataUtilities.makeDataLists(new Object[][]{ new Object[]{"1", "", "desc"}, new Object[]{"2", "Custom Rule Name", "desc"}, new Object[]{"3", "", "desc"} })); assertEquals("Row 1 My table", p.getName(dt, dt.getData().get(0), 1)); assertEquals("Custom Rule Name", p.getName(dt, dt.getData().get(1), 2)); assertEquals("Row 3 My table", p.getName(dt, dt.getData().get(2), 3)); }