@SuppressWarnings(
      "deprecation") // uses deprecated {@link ValueRecordsAggregate#getValueRecords()}
  public void testInsertCell() {
    CellValueRecordInterface[] cvrs = valueRecord.getValueRecords();
    assertEquals(0, cvrs.length);

    BlankRecord blankRecord = newBlankRecord();
    valueRecord.insertCell(blankRecord);
    cvrs = valueRecord.getValueRecords();
    assertEquals(1, cvrs.length);
  }
  @SuppressWarnings(
      "deprecation") // uses deprecated {@link ValueRecordsAggregate#getValueRecords()}
  public void testRemoveCell() {
    BlankRecord blankRecord1 = newBlankRecord();
    valueRecord.insertCell(blankRecord1);
    BlankRecord blankRecord2 = newBlankRecord();
    valueRecord.removeCell(blankRecord2);
    CellValueRecordInterface[] cvrs = valueRecord.getValueRecords();
    assertEquals(0, cvrs.length);

    // removing an already empty cell just falls through
    valueRecord.removeCell(blankRecord2);
  }
  /**
   * Make sure the shared formula DOESNT makes it to the FormulaRecordAggregate when being parsed as
   * part of the value records
   */
  @SuppressWarnings(
      "deprecation") // uses deprecated {@link ValueRecordsAggregate#getValueRecords()}
  public void testSharedFormula() {
    List<Record> records = new ArrayList<Record>();
    records.add(new FormulaRecord());
    records.add(new SharedFormulaRecord());
    records.add(new WindowTwoRecord());

    constructValueRecord(records);
    CellValueRecordInterface[] cvrs = valueRecord.getValueRecords();
    // Ensure that the SharedFormulaRecord has been converted
    assertEquals(1, cvrs.length);

    CellValueRecordInterface record = cvrs[0];
    assertNotNull("Row contains a value", record);
    assertTrue(
        "First record is a FormulaRecordsAggregate", (record instanceof FormulaRecordAggregate));
  }
 public CellValueRecordInterface[] getValueRecords() {
   return _valuesAgg.getValueRecords();
 }