@@ -890,16 +890,16 @@ void testExecutorSettings() throws Exception {
890890 assertThat (transportChannel .getExecutor ()).isSameInstanceAs (executorProvider .getExecutor ());
891891 }
892892
893- private GdchCredentials getMockGdchCredentials () throws IOException {
893+ private GdchCredentials getMockGdchCredentials () {
894894 GdchCredentials creds = Mockito .mock (GdchCredentials .class );
895895
896896 // GdchCredentials builder is mocked to accept a well-formed uri
897897 GdchCredentials .Builder gdchCredsBuilder = Mockito .mock (GdchCredentials .Builder .class );
898- Mockito .when (gdchCredsBuilder .setGdchAudience (Mockito .any ( URI . class )))
898+ Mockito .when (gdchCredsBuilder .setGdchAudience (Mockito .anyString ( )))
899899 .thenReturn (gdchCredsBuilder );
900900 Mockito .when (gdchCredsBuilder .build ()).thenReturn (creds );
901901 Mockito .when (creds .toBuilder ()).thenReturn (gdchCredsBuilder );
902- Mockito .when (creds .createWithGdchAudience (Mockito .any ()))
902+ Mockito .when (creds .createWithGdchAudience (Mockito .anyString ()))
903903 .thenAnswer ((uri ) -> getMockGdchCredentials ());
904904 return creds ;
905905 }
@@ -939,7 +939,7 @@ void testCreateClientContext_withGdchCredentialNoAudienceNoEndpoint() throws IOE
939939 assertThat (fromProvider ).isInstanceOf (GdchCredentials .class );
940940 assertNotSame (fromContext , fromProvider );
941941 verify ((GdchCredentials ) fromProvider , times (1 ))
942- .createWithGdchAudience (URI . create ( "test.googleapis.com:443" ) );
942+ .createWithGdchAudience ("test.googleapis.com:443" );
943943 }
944944
945945 @ Test
@@ -995,7 +995,7 @@ void testCreateClientContext_withGdchCredentialWithoutAudienceWithEndpoint_corre
995995 assertThat (fromProvider ).isInstanceOf (GdchCredentials .class );
996996 assertNotSame (fromContext , fromProvider );
997997 verify ((GdchCredentials ) fromProvider , times (1 ))
998- .createWithGdchAudience (URI . create ( "test-endpoint" ) );
998+ .createWithGdchAudience ("test-endpoint" );
999999 }
10001000
10011001 @ Test
@@ -1022,9 +1022,9 @@ void testCreateClientContext_withGdchCredentialAndValidAudience() throws IOExcep
10221022 // using an audience should have made the context to recreate the credentials
10231023 assertNotSame (fromContext , fromProvider );
10241024 verify ((GdchCredentials ) fromProvider , times (1 ))
1025- .createWithGdchAudience (URI . create ( "valid-uri" ) );
1025+ .createWithGdchAudience ("valid-uri" );
10261026 verify ((GdchCredentials ) fromProvider , times (0 ))
1027- .createWithGdchAudience (URI . create ( "test-endpoint" ) );
1027+ .createWithGdchAudience ("test-endpoint" );
10281028 }
10291029
10301030 @ Test
0 commit comments