@@ -86,6 +86,8 @@ public void testCreateMutableCredentials() throws IOException {
8686 public void testCreateMutableCredentialsWithDefaultScopes () throws IOException {
8787 Set <String > defaultScopes = SpannerOptions .SCOPES ;
8888 when (initialCredentials .createScoped (defaultScopes )).thenReturn (initialScopedCredentials );
89+ when (initialScopedCredentials .createWithUseJwtAccessWithScope (true ))
90+ .thenReturn (initialScopedCredentials );
8991 when (initialScopedCredentials .getAuthenticationType ()).thenReturn (initialAuthType );
9092 when (initialScopedCredentials .getRequestMetadata (any (URI .class ))).thenReturn (initialMetadata );
9193 when (initialScopedCredentials .getUniverseDomain ()).thenReturn (initialUniverseDomain );
@@ -172,6 +174,8 @@ private void validateInitialDelegatedCredentialsAreSet(
172174
173175 private void setupInitialCredentials () throws IOException {
174176 when (initialCredentials .createScoped (scopes )).thenReturn (initialScopedCredentials );
177+ when (initialScopedCredentials .createWithUseJwtAccessWithScope (true ))
178+ .thenReturn (initialScopedCredentials );
175179 when (initialCredentials .createScoped (Collections .emptyList ()))
176180 .thenReturn (initialScopedCredentials );
177181 when (initialScopedCredentials .getAuthenticationType ()).thenReturn (initialAuthType );
@@ -185,6 +189,8 @@ private void setupInitialCredentials() throws IOException {
185189
186190 private void setupUpdatedCredentials () throws IOException {
187191 when (updatedCredentials .createScoped (scopes )).thenReturn (updatedScopedCredentials );
192+ when (updatedScopedCredentials .createWithUseJwtAccessWithScope (true ))
193+ .thenReturn (updatedScopedCredentials );
188194 when (updatedScopedCredentials .getAuthenticationType ()).thenReturn (updatedAuthType );
189195 when (updatedScopedCredentials .getRequestMetadata (any (URI .class ))).thenReturn (updatedMetadata );
190196 when (updatedScopedCredentials .getUniverseDomain ()).thenReturn (updatedUniverseDomain );
0 commit comments