@Test
public void testAdminSettingsWithEmulator() throws IOException {

  ServerSocket serverSocket = new ServerSocket(0);
  final int availablePort = serverSocket.getLocalPort();
  serverSocket.close();
  String emulatorHost = "localhost:" + availablePort;
  configuration.set(BIGTABLE_EMULATOR_HOST_KEY, emulatorHost);
  BigtableTableAdminSettings adminSettings =
      ((BigtableHBaseVeneerSettings) BigtableHBaseVeneerSettings.create(configuration))
          .getTableAdminSettings();
  assertEquals(emulatorHost, adminSettings.getStubSettings().getEndpoint());
  CredentialsProvider credProvider = adminSettings.getStubSettings().getCredentialsProvider();
  assertTrue(credProvider instanceof NoCredentialsProvider);
}