public static void registerSerializers(Fury fury) {
    fury.registerSerializer(ArrowTable.class, new ArrowTableSerializer(fury));
    fury.registerSerializer(VectorSchemaRoot.class, new VectorSchemaRootSerializer(fury));
  }
@Test
  public void testWriteArrowTable() throws IOException {
    Collection<BufferObject> bufferObjects = new ArrayList<>();
    Fury fury = Fury.builder().requireClassRegistration(false).build();
    ArrowSerializers.registerSerializers(fury);
    int size = 2000;
    VectorSchemaRoot root = ArrowUtilsTest.createVectorSchemaRoot(size);
    Schema schema = root.getSchema();
    List<ArrowRecordBatch> recordBatches = new ArrayList<>();
    for (int i = 0; i < 2; i++) {
      VectorUnloader unloader = new VectorUnloader(root);
      recordBatches.add(unloader.getRecordBatch());
    }
    ArrowTable table = new ArrowTable(schema, recordBatches);
    Assert.assertEquals(
        fury.getClassResolver().getSerializer(ArrowTable.class).getClass(),
        ArrowTableSerializer.class);
    byte[] serializedData = fury.serialize(table, e -> !bufferObjects.add(e));
    List<MemoryBuffer> buffers =
        bufferObjects.stream().map(BufferObject::toBuffer).collect(Collectors.toList());
    Assert.assertEquals(bufferObjects.size(), 1);

    ArrowTable newTable = (ArrowTable) fury.deserialize(serializedData, buffers);
    assertTableEqual(newTable, table);

    // test in band serialization.
    fury = Fury.builder().requireClassRegistration(false).build();
    ArrowSerializers.registerSerializers(fury);
    newTable = (ArrowTable) fury.deserialize(fury.serialize(table));
    assertTableEqual(newTable, table);
  }