BigtableHBaseVeneerSettings extends BigtableHBaseSettings { @Nullable public BigtableInstanceAdminSettings getInstanceAdminSettings() { return instanceAdminSettings; } BigtableHBaseVeneerSettings(Configuration configuration); @Override String getDataHost(); @Override String getAdminHost(); @Override int getPort(); @Override int getBulkMaxRowCount(); @Override long getBatchingMaxRequestSize(); @Override boolean isRetriesWithoutTimestampAllowed(); boolean isChannelPoolCachingEnabled(); BigtableDataSettings getDataSettings(); BigtableTableAdminSettings getTableAdminSettings(); @Nullable BigtableInstanceAdminSettings getInstanceAdminSettings();  }
@Test public void testInstanceAdminSettingsBasicKeys() throws IOException { String userAgent = "test-user-agent"; Credentials credentials = Mockito.mock(Credentials.class); configuration.set(CUSTOM_USER_AGENT_KEY, userAgent); configuration.set(BIGTABLE_USE_SERVICE_ACCOUNTS_KEY, "true"); configuration = BigtableConfiguration.withCredentials(configuration, credentials); BigtableHBaseVeneerSettings settings = (BigtableHBaseVeneerSettings) BigtableHBaseSettings.create(configuration); BigtableInstanceAdminSettings instanceAdminSettings = settings.getInstanceAdminSettings(); assertEquals(TEST_PROJECT_ID, instanceAdminSettings.getProjectId()); Map<String, String> headers = instanceAdminSettings.getStubSettings().getHeaderProvider().getHeaders(); assertTrue(headers.get(GrpcUtil.USER_AGENT_KEY.name()).contains(userAgent)); assertEquals( credentials, instanceAdminSettings.getStubSettings().getCredentialsProvider().getCredentials()); }