### Question:
AdapterDelegatingOauth2Service implements Oauth2Service { @Override public URI getAuthorizationRequestUri(Map<String, String> headers, Parameters parameters) throws IOException { return getOauth2Service(headers) .getAuthorizationRequestUri(headers, parameters); } AdapterDelegatingOauth2Service(AdapterServiceLoader adapterServiceLoader); @Override URI getAuthorizationRequestUri(Map<String, String> headers, Parameters parameters); @Override TokenResponse getToken(Map<String, String> headers, Parameters parameters);  }### Answer:
@Test void getAuthorizationRequestUri() throws IOException { when(serviceLoader.getOauth2Service(any(RequestHeaders.class))).thenReturn(testService); oauth2Service.getAuthorizationRequestUri(new HashMap<>(), new Oauth2Service.Parameters()); verify(serviceLoader, times(1)).getOauth2Service(any(RequestHeaders.class)); verify(testService, times(1)).getAuthorizationRequestUri(anyMap(), any(Oauth2Service.Parameters.class)); }