public static AsyncArchiveService startAsyncArchiveIfEnabled(BaseHoodieWriteClient writeClient) {
    HoodieWriteConfig config = writeClient.getConfig();
    if (!config.isAutoArchive() || !config.isAsyncArchive()) {
      LOG.info("The HoodieWriteClient is not configured to auto & async archive. Async archive service will not start.");
      return null;
    }
    AsyncArchiveService asyncArchiveService = new AsyncArchiveService(writeClient);
    asyncArchiveService.start(null);
    return asyncArchiveService;
  }
@Test
  void startAsyncArchiveReturnsNullWhenAutoArchiveDisabled() {
    when(config.isAutoArchive()).thenReturn(false);
    when(writeClient.getConfig()).thenReturn(config);
    assertNull(AsyncArchiveService.startAsyncArchiveIfEnabled(writeClient));
  }