@Override
  public void syncHoodieTable() {
    switch (bqSyncClient.getTableType()) {
      case COPY_ON_WRITE:
      case MERGE_ON_READ:
        syncTable(bqSyncClient);
        break;
      default:
        throw new UnsupportedOperationException(bqSyncClient.getTableType() + " table type is not supported yet.");
    }
  }
@Test
  void useBQManifestFile_newTableNonPartitioned() {
    properties.setProperty(BigQuerySyncConfig.BIGQUERY_SYNC_USE_BQ_MANIFEST_FILE.key(), "true");
    when(mockBqSyncClient.getTableType()).thenReturn(HoodieTableType.COPY_ON_WRITE);
    when(mockBqSyncClient.getBasePath()).thenReturn(TEST_TABLE_BASE_PATH);
    when(mockBqSyncClient.datasetExists()).thenReturn(true);
    when(mockBqSyncClient.tableNotExistsOrDoesNotMatchSpecification(TEST_TABLE)).thenReturn(true);
    Path manifestPath = new Path("file:///local/path");
    when(mockManifestFileWriter.getManifestSourceUri(true)).thenReturn(manifestPath.toUri().getPath());
    when(mockBqSchemaResolver.getTableSchema(any(), eq(Collections.emptyList()))).thenReturn(schema);
    BigQuerySyncTool tool = new BigQuerySyncTool(properties, mockManifestFileWriter, mockBqSyncClient, mockMetaClient, mockBqSchemaResolver);
    tool.syncHoodieTable();
    verify(mockBqSyncClient).createOrUpdateTableUsingBqManifestFile(TEST_TABLE, manifestPath.toUri().getPath(), null, schema);
    verify(mockManifestFileWriter).writeManifestFile(true);
  }