/** * Tests that the builder builds correctly using a service account key file. */ @Test public void testBuilder_serviceAccount() throws Exception { OfflineCredentials offlineCredentials = new OfflineCredentials.Builder() .forApi(OfflineCredentials.Api.AD_MANAGER) .withJsonKeyFilePath("jsonKeyFilePath") .build(); assertEquals("jsonKeyFilePath", offlineCredentials.getJsonKeyFilePath()); }