public synchronized void executeDdlStatement(String statement) throws IllegalStateException {
    checkIsUsable();
    maybeCreateInstance();
    maybeCreateDatabase();

    LOG.info("Executing DDL statement '{}' on database {}.", statement, databaseId);
    try {
      databaseAdminClient
          .updateDatabaseDdl(
              instanceId, databaseId, ImmutableList.of(statement), /* operationId= */ null)
          .get();
      LOG.info("Successfully executed DDL statement '{}' on database {}.", statement, databaseId);
    } catch (ExecutionException | InterruptedException | SpannerException e) {
      throw new SpannerResourceManagerException("Failed to execute statement.", e);
    }
  }
@Test
  public void testExecuteDdlStatementShouldWorkWhenSpannerDoesntThrowAnyError()
      throws ExecutionException, InterruptedException {
    //   arrange
    prepareCreateInstanceMock();
    prepareCreateDatabaseMock();
    prepareUpdateDatabaseMock();
    String statement =
        "CREATE TABLE Singers (\n"
            + "  SingerId   INT64 NOT NULL,\n"
            + "  FirstName  STRING(1024),\n"
            + "  LastName   STRING(1024),\n"
            + ") PRIMARY KEY (SingerId)";

    // act
    testManager.executeDdlStatement(statement);

    // assert
    // verify createInstance, createDatabase, and updateDatabaseDdl were called twice - once in
    // create table, once in their respective prepareMock helper methods.
    verify(spanner.getInstanceAdminClient(), times(2)).createInstance(any());
    verify(spanner.getDatabaseAdminClient(), times(2)).createDatabase(any(), any());
    verify(spanner.getDatabaseAdminClient(), times(2))
        .updateDatabaseDdl(
            instanceIdCaptor.capture(),
            databaseIdCaptor.capture(),
            statementCaptor.capture(),
            any());

    String actualInstanceId = instanceIdCaptor.getValue();
    String actualDatabaseId = databaseIdCaptor.getValue();
    Iterable<String> actualStatement = statementCaptor.getValue();

    assertThat(actualInstanceId).matches(TEST_ID + "-\\d{8}-\\d{6}-\\d{6}");

    assertThat(actualDatabaseId).matches(TEST_ID + "_\\d{8}_\\d{6}_\\d{6}");
    assertThat(actualStatement).containsExactlyElementsIn(ImmutableList.of(statement));
  }