/**
* Tests that BeanTableFormat works as an AdvancedTableFormat.
*/
public void testAdvancedTableFormat() {
AdvancedTableFormat emptyAdvancedFootballFormat = (AdvancedTableFormat)footballFormat;
assertEquals(Object.class, emptyAdvancedFootballFormat.getColumnClass(0));
assertEquals(Object.class, emptyAdvancedFootballFormat.getColumnClass(1));
assertEquals(Object.class, emptyAdvancedFootballFormat.getColumnClass(2));
assertEquals(Object.class, emptyAdvancedFootballFormat.getColumnClass(3));
assertEquals(Object.class, emptyAdvancedFootballFormat.getColumnClass(4));
assertEquals(Object.class, emptyAdvancedFootballFormat.getColumnClass(5));
assertEquals(GlazedLists.comparableComparator(), emptyAdvancedFootballFormat.getColumnComparator(0));
assertEquals(GlazedLists.comparableComparator(), emptyAdvancedFootballFormat.getColumnComparator(1));
assertEquals(GlazedLists.comparableComparator(), emptyAdvancedFootballFormat.getColumnComparator(2));
assertEquals(GlazedLists.comparableComparator(), emptyAdvancedFootballFormat.getColumnComparator(3));
assertEquals(GlazedLists.comparableComparator(), emptyAdvancedFootballFormat.getColumnComparator(4));
assertEquals(GlazedLists.comparableComparator(), emptyAdvancedFootballFormat.getColumnComparator(5));
AdvancedTableFormat fullAdvancedFootballFormat = (AdvancedTableFormat)classedFootballFormat;
assertEquals(String.class, fullAdvancedFootballFormat.getColumnClass(0));
assertEquals(String.class, fullAdvancedFootballFormat.getColumnClass(1));
assertEquals(Color.class, fullAdvancedFootballFormat.getColumnClass(2));
assertEquals(Color.class, fullAdvancedFootballFormat.getColumnClass(3));
assertEquals(Boolean.class, fullAdvancedFootballFormat.getColumnClass(4));
assertEquals(Integer.class, fullAdvancedFootballFormat.getColumnClass(5));
assertEquals(GlazedLists.comparableComparator(), fullAdvancedFootballFormat.getColumnComparator(0));
assertEquals(GlazedLists.comparableComparator(), fullAdvancedFootballFormat.getColumnComparator(1));
assertEquals(null, fullAdvancedFootballFormat.getColumnComparator(2));
assertEquals(null, fullAdvancedFootballFormat.getColumnComparator(3));
// this returns GlazedLists.comparableComparator() on Java 5, where Boolean implements Comparable,
// but it returns null on prior versions where Boolean does not implement Comparable
boolean booleanIsComparable = Boolean.TRUE instanceof Comparable;
assertEquals(booleanIsComparable, GlazedLists.comparableComparator() == fullAdvancedFootballFormat.getColumnComparator(4));
assertEquals(GlazedLists.comparableComparator(), fullAdvancedFootballFormat.getColumnComparator(5));
}