//read in sample
HSSFWorkbook book = _hssfDP.openSampleWorkbook("Simple.xls");
//check initial position
HSSFSheet umSheet = book.getSheetAt(0);
Sheet s = umSheet.getSheet();
assertEquals("Initial active cell should be in col 0",
(short) 0, s.getActiveCellCol());
assertEquals("Initial active cell should be on row 1",
1, s.getActiveCellRow());
//modify position through HSSFCell
HSSFCell cell = umSheet.createRow(3).createCell(2);
cell.setAsActiveCell();
assertEquals("After modify, active cell should be in col 2",
(short) 2, s.getActiveCellCol());
assertEquals("After modify, active cell should be on row 3",
3, s.getActiveCellRow());
//write book to temp file; read and verify that position is serialized
book = _hssfDP.writeOutAndReadBack(book);
umSheet = book.getSheetAt(0);
s = umSheet.getSheet();
assertEquals("After serialize, active cell should be in col 2",
(short) 2, s.getActiveCellCol());
assertEquals("After serialize, active cell should be on row 3",
3, s.getActiveCellRow());
}