### Question:
ChangelogTableDynamicDestinations extends DynamicDestinations<TableRow, String> { public static String getBigQueryTableName(String sourceTable, Boolean isChangelogTable) { String[] tableNameComponents = sourceTable.split("\\."); LOG.debug("Source table: {}. After split: {}", sourceTable, tableNameComponents); if (isChangelogTable) { return String.format("%s_changelog", tableNameComponents[2]); } else { return tableNameComponents[2]; } } ChangelogTableDynamicDestinations(
      String changeLogDataset,
      String gcpProjectId,
      PCollectionView<Map<String, KV<Schema, Schema>>> schemaMapView); static String getBigQueryTableName(String sourceTable, Boolean isChangelogTable); @Override String getDestination(ValueInSingleWindow<TableRow> rowInfo); @Override TableDestination getTable(String targetTable); @Override TableSchema getSchema(String targetTable); @Override List<PCollectionView<?>> getSideInputs();  }### Answer:
@Test void testTableNameFormatting() { String sourceTable = "mainstance.cdcForDataflow.team_metadata"; assertThat( ChangelogTableDynamicDestinations.getBigQueryTableName(sourceTable, false), equalTo("team_metadata")); assertThat( ChangelogTableDynamicDestinations.getBigQueryTableName(sourceTable, true), equalTo("team_metadata_changelog")); }