@Test
public void checkNullsHandling() throws Exception{
List<UnbackedRecord> records = TestUtils.getResultAsUnbackedRecords("/collapse/test1.json");
DataValue[] depts = {DataValue.NULL_VALUE, new LongScalar(31), new LongScalar(33), new LongScalar(34)};
DataValue[] cnts = {new LongScalar(1), new LongScalar(1), new LongScalar(2), new LongScalar(2)};
SchemaPath typeCount = new SchemaPath("typeCount", ExpressionPosition.UNKNOWN);
SchemaPath dept = new SchemaPath("deptId", ExpressionPosition.UNKNOWN);
for(int i =0; i < depts.length; i++){
UnbackedRecord r = records.get(i);
assertEquals(String.format("Invalid dept value for record %d.", i), depts[i], r.getField(dept));