assertEquals(4, row2.getCell(1).getNumericCellValue(), 0.0000000000000001); //B2: 4
assertEquals(5, row1.getCell(4).getNumericCellValue(), 0.0000000000000001); //E1: 5
assertEquals(6, row1.getCell(5).getNumericCellValue(), 0.0000000000000001); //F1: 6
//D3: =SUM(E1:F1)
Cell cellD3 = row3.getCell(3);
CellValue valueD3 = _evaluator.evaluate(cellD3);
assertEquals(11, valueD3.getNumberValue(), 0.0000000000000001);
assertEquals(Cell.CELL_TYPE_NUMERIC, valueD3.getCellType());
testToFormulaString(cellD3, "SUM(E1:F1)");
//Copy cell (D3 -> IV3)
BookHelper.copyCell(cellD3, sheet1, 2, 255, Range.PASTE_ALL, Range.PASTEOP_NONE, false);
_evaluator.notifySetFormula(cellD3);
//A1,A2,A2,B2,E1,F1 stay as is
assertEquals(1, row1.getCell(0).getNumericCellValue(), 0.0000000000000001); //A1: 1
assertEquals(2, row1.getCell(1).getNumericCellValue(), 0.0000000000000001); //B1: 2
assertEquals(3, row2.getCell(0).getNumericCellValue(), 0.0000000000000001); //A2: 3
assertEquals(4, row2.getCell(1).getNumericCellValue(), 0.0000000000000001); //B2: 4
assertEquals(5, row1.getCell(4).getNumericCellValue(), 0.0000000000000001); //E1: 5
assertEquals(6, row1.getCell(5).getNumericCellValue(), 0.0000000000000001); //F1: 6
//D3 stay as is
valueD3 = _evaluator.evaluate(cellD3);
assertEquals(11, valueD3.getNumberValue(), 0.0000000000000001);
assertEquals(Cell.CELL_TYPE_NUMERIC, valueD3.getCellType());
testToFormulaString(cellD3, "SUM(E1:F1)");
//IV3: #REF!
Cell cellIV3 = row3.getCell(255);
CellValue valueIV3 = _evaluator.evaluate(cellIV3);
assertEquals(ErrorConstants.ERROR_REF, valueIV3.getErrorValue());
assertEquals(Cell.CELL_TYPE_ERROR, valueIV3.getCellType());
testToFormulaString(cellIV3, "SUM(#REF!)");
}