@Override
  public String toString() {
    return this.getClass().getSimpleName() + " " + type.getName()
        + " r:" + repetitionLevel
        + " d:" + definitionLevel
        + " " + Arrays.toString(fieldPath);
  }
@Test
  public void testGroupWriter() {
    List<Group> result = new ArrayList<>();
    final GroupRecordConverter groupRecordConverter = new GroupRecordConverter(schema);
    RecordConsumer groupConsumer = new ConverterConsumer(groupRecordConverter.getRootConverter(), schema);
    GroupWriter groupWriter = new GroupWriter(new RecordConsumerLoggingWrapper(groupConsumer), schema);
    groupWriter.write(r1);
    result.add(groupRecordConverter.getCurrentRecord());
    groupWriter.write(r2);
    result.add(groupRecordConverter.getCurrentRecord());
    assertEquals(
        "deserialization does not display the expected result",
        result.get(0).toString(),
        r1.toString());
    assertEquals(
        "deserialization does not display the expected result",
        result.get(1).toString(),
        r2.toString());
  }