}
public void testAutoFilter(){
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sh = wb.createSheet();
InternalWorkbook iwb = wb.getWorkbook();
InternalSheet ish = sh.getSheet();
assertNull( iwb.getSpecificBuiltinRecord(NameRecord.BUILTIN_FILTER_DB, 1) );
assertNull( ish.findFirstRecordBySid(AutoFilterInfoRecord.sid) );
CellRangeAddress range = CellRangeAddress.valueOf("A1:B10");
sh.setAutoFilter(range);
NameRecord name = iwb.getSpecificBuiltinRecord(NameRecord.BUILTIN_FILTER_DB, 1);
assertNotNull( name );
// The built-in name for auto-filter must consist of a single Area3d Ptg.
Ptg[] ptg = name.getNameDefinition();
assertEquals("The built-in name for auto-filter must consist of a single Area3d Ptg", 1, ptg.length);