}
@Test
public void testMoveD6G8_E7H9() { //partial block move down-right
Worksheet sheet1 = _workbook.getWorksheet("Sheet1");
Row row1 = sheet1.getRow(0);
Row row4 = sheet1.getRow(3);
Row row5 = sheet1.getRow(4);
Row row6 = sheet1.getRow(5);
Row row7 = sheet1.getRow(6);
assertEquals(1, row4.getCell(2).getNumericCellValue(), 0.0000000000000001); //C4: 1
assertEquals(2, row4.getCell(3).getNumericCellValue(), 0.0000000000000001); //D4: 2
assertEquals(3, row4.getCell(4).getNumericCellValue(), 0.0000000000000001); //E4: 3
assertEquals(4, row4.getCell(5).getNumericCellValue(), 0.0000000000000001); //F4: 4
assertEquals(5, row5.getCell(2).getNumericCellValue(), 0.0000000000000001); //C5: 5
assertEquals(6, row5.getCell(3).getNumericCellValue(), 0.0000000000000001); //D5: 6
assertEquals(7, row5.getCell(4).getNumericCellValue(), 0.0000000000000001); //E5: 7
assertEquals(8, row5.getCell(5).getNumericCellValue(), 0.0000000000000001); //F5: 8
assertEquals(9, row6.getCell(2).getNumericCellValue(), 0.0000000000000001); //C6: 9
assertEquals(10, row6.getCell(3).getNumericCellValue(), 0.0000000000000001); //D6: 10
assertEquals(11, row6.getCell(4).getNumericCellValue(), 0.0000000000000001); //E6: 11
assertEquals(12, row6.getCell(5).getNumericCellValue(), 0.0000000000000001); //F6: 12
assertEquals(13, row7.getCell(2).getNumericCellValue(), 0.0000000000000001); //C7: 13
assertEquals(14, row7.getCell(3).getNumericCellValue(), 0.0000000000000001); //D7: 14
assertEquals(15, row7.getCell(4).getNumericCellValue(), 0.0000000000000001); //E7: 15
assertEquals(16, row7.getCell(5).getNumericCellValue(), 0.0000000000000001); //F7: 16
//A1: =SUM(C4:F7);
Cell cellA1 = row1.getCell(0);
CellValue valueA1 = _evaluator.evaluate(cellA1);
assertEquals(136, valueA1.getNumberValue(), 0.0000000000000001);
assertEquals(Cell.CELL_TYPE_NUMERIC, valueA1.getCellType());
testToFormulaString(cellA1, "SUM(C4:F7)");
//move left from D6:G8 to E7:H9
BookHelper.moveRange(sheet1, 5, 3, 7, 6, 1, 1);
_evaluator.notifySetFormula(cellA1);
assertEquals(1, row4.getCell(2).getNumericCellValue(), 0.0000000000000001); //C4: 1
assertEquals(2, row4.getCell(3).getNumericCellValue(), 0.0000000000000001); //D4: 2
assertEquals(3, row4.getCell(4).getNumericCellValue(), 0.0000000000000001); //E4: 3
assertEquals(4, row4.getCell(5).getNumericCellValue(), 0.0000000000000001); //F4: 4
assertEquals(5, row5.getCell(2).getNumericCellValue(), 0.0000000000000001); //C5: 5
assertEquals(6, row5.getCell(3).getNumericCellValue(), 0.0000000000000001); //D5: 6
assertEquals(7, row5.getCell(4).getNumericCellValue(), 0.0000000000000001); //E5: 7
assertEquals(8, row5.getCell(5).getNumericCellValue(), 0.0000000000000001); //F5: 8
assertEquals(9, row6.getCell(2).getNumericCellValue(), 0.0000000000000001); //C6: 9
assertNull(row6.getCell(3));
assertNull(row6.getCell(4));
assertNull(row6.getCell(5));
assertEquals(13, row7.getCell(2).getNumericCellValue(), 0.0000000000000001); //C7: 13
assertNull(row7.getCell(3));
assertEquals(10, row7.getCell(4).getNumericCellValue(), 0.0000000000000001); //D6: 10
assertEquals(11, row7.getCell(5).getNumericCellValue(), 0.0000000000000001); //E6: 11
assertEquals(12, row7.getCell(6).getNumericCellValue(), 0.0000000000000001); //F6: 12
Row row8 = sheet1.getRow(7);
assertNull(row8.getCell(2));
assertNull(row8.getCell(3));
assertEquals(14, row8.getCell(4).getNumericCellValue(), 0.0000000000000001); //D7: 14
assertEquals(15, row8.getCell(5).getNumericCellValue(), 0.0000000000000001); //E7: 15
assertEquals(16, row8.getCell(6).getNumericCellValue(), 0.0000000000000001); //F7: 16
//A1: =SUM(C4:F7) -> =SUM(C4:F7) //no change
cellA1 = row1.getCell(0);
valueA1 = _evaluator.evaluate(cellA1);
assertEquals(79, valueA1.getNumberValue(), 0.0000000000000001);