@Test
public void testTableAdminWithNullCredentials() throws IOException {

  ServerSocket serverSocket = new ServerSocket(0);
  final int availablePort = serverSocket.getLocalPort();
  serverSocket.close();
  BigtableOptions options =
      BigtableOptions.builder()
          .setProjectId(TEST_PROJECT_ID)
          .setInstanceId(TEST_INSTANCE_ID)
          .setCredentialOptions(CredentialOptions.nullCredential())
          .setUserAgent(TEST_USER_AGENT)
          .setAdminHost("localhost")
          .setPort(availablePort)
          .build();
  adminSettings = BigtableVeneerSettingsFactory.createTableAdminSettings(options);
  assertTrue(
      adminSettings.getStubSettings().getCredentialsProvider() instanceof NoCredentialsProvider);
}