"17 00 65 00 00 01 00 02 C0 02 C0 65 00 00 01 00 " +
"03 C0 03 C0 04 62 01 07 00";
byte[] data = HexRead.readFromString(hex);
RecordInputStream in = TestcaseRecordInputStream.create(data);
ArrayRecord r1 = new ArrayRecord(in);
CellRangeAddress8Bit range = r1.getRange();
assertEquals(1, range.getFirstColumn());
assertEquals(1, range.getLastColumn());
assertEquals(1, range.getFirstRow());
assertEquals(1, range.getLastRow());
Ptg[] ptg = r1.getFormulaTokens();
assertEquals("MAX(C1:C2-D1:D2)", FormulaRenderer.toFormulaString(null, ptg));
//construct a new ArrayRecord with the same contents as r1
Ptg[] fmlaPtg = FormulaParser.parse("MAX(C1:C2-D1:D2)", null, FormulaType.ARRAY, 0);
ArrayRecord r2 = new ArrayRecord(Formula.create(fmlaPtg), new CellRangeAddress8Bit(1, 1, 1, 1));
byte[] ser = r2.serialize();
//serialize and check that the data is the same as in r1
assertEquals(HexDump.toHex(data), HexDump.toHex(ser));