public void cloneSheet() {
Workbook book = _testDataProvider.createWorkbook();
Sheet sheet = book.createSheet("TEST");
sheet.createRow(0).createCell(0).setCellValue("Test");
sheet.createRow(1).createCell(0).setCellValue(36.6);
sheet.addMergedRegion(new CellRangeAddress(0, 1, 0, 2));
sheet.addMergedRegion(new CellRangeAddress(1, 2, 0, 2));
assertTrue(sheet.isSelected());
Sheet clonedSheet = book.cloneSheet(0);
assertEquals("TEST (2)", clonedSheet.getSheetName());
assertEquals(2, clonedSheet.getPhysicalNumberOfRows());
assertEquals(2, clonedSheet.getNumMergedRegions());
assertFalse(clonedSheet.isSelected());
//cloned sheet is a deep copy, adding rows in the original does not affect the clone
sheet.createRow(2).createCell(0).setCellValue(1);
sheet.addMergedRegion(new CellRangeAddress(0, 2, 0, 2));
assertEquals(2, clonedSheet.getPhysicalNumberOfRows());
assertEquals(2, clonedSheet.getPhysicalNumberOfRows());
clonedSheet.createRow(2).createCell(0).setCellValue(1);
clonedSheet.addMergedRegion(new CellRangeAddress(0, 2, 0, 2));
assertEquals(3, clonedSheet.getPhysicalNumberOfRows());
assertEquals(3, clonedSheet.getPhysicalNumberOfRows());
}