BigtableVeneerSettingsFactory { public static BigtableTableAdminSettings createTableAdminSettings( @Nonnull final BigtableOptions options) throws IOException { final BigtableTableAdminSettings.Builder adminBuilder = BigtableTableAdminSettings.newBuilder(); BigtableTableAdminStubSettings.Builder adminStub = adminBuilder.stubSettings(); adminBuilder.setProjectId(options.getProjectId()).setInstanceId(options.getInstanceId()); adminStub .setHeaderProvider(buildHeaderProvider(options.getUserAgent())) .setEndpoint(options.getAdminHost() + ":" + options.getPort()) .setCredentialsProvider(buildCredentialProvider(options.getCredentialOptions())); if (options.usePlaintextNegotiation()) { adminStub.setTransportChannelProvider(buildChannelProvider(adminStub.getEndpoint(), options)); } return adminBuilder.build(); }  static BigtableDataSettings createBigtableDataSettings(
      @Nonnull final BigtableOptions options); static BigtableTableAdminSettings createTableAdminSettings(
      @Nonnull final BigtableOptions options);  }
@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); }