@Test
public void testAttribs() {

    GuidedDTDRLPersistence p = new GuidedDTDRLPersistence();
    Object[] row = new Object[]{"1", "desc", "a", null};
    List<BaseColumn> allColumns = new ArrayList<BaseColumn>();
    allColumns.add(new RowNumberCol52());
    allColumns.add(new DescriptionCol52());
    List<AttributeCol52> attributeCols = new ArrayList<AttributeCol52>();
    RuleModel rm = new RuleModel();
    RuleAttribute[] orig = rm.attributes;
    p.doAttribs(allColumns,
                attributeCols,
                DataUtilities.makeDataRowList(row),
                rm);
    assertSame(orig,
               rm.attributes);
    AttributeCol52 col1 = new AttributeCol52();
    col1.setAttribute(Attribute.SALIENCE.getAttributeName());
    AttributeCol52 col2 = new AttributeCol52();
    col2.setAttribute(Attribute.AGENDA_GROUP.getAttributeName());
    attributeCols.add(col1);
    attributeCols.add(col2);
    allColumns.addAll(attributeCols);
    p.doAttribs(allColumns,
                attributeCols,
                DataUtilities.makeDataRowList(row),
                rm);
    assertEquals(1,
                 rm.attributes.length);
    assertEquals("salience",
                 rm.attributes[0].getAttributeName());
    assertEquals("a",
                 rm.attributes[0].getValue());
    row = new Object[]{"1", "desc", 1l, "b"};
    p.doAttribs(allColumns,
                attributeCols,
                DataUtilities.makeDataRowList(row),
                rm);
    assertEquals(2,
                 rm.attributes.length);
    assertEquals("salience",
                 rm.attributes[0].getAttributeName());
    assertEquals("1",
                 rm.attributes[0].getValue());
    assertEquals("agenda-group",
                 rm.attributes[1].getAttributeName());
    assertEquals("b",
                 rm.attributes[1].getValue());
}