HttpSsoServerClient implements ServerClient { @Override public void unregisterClient(String token, String clientUrl) { try { requestFactory .fromUrl( UriBuilder.fromUri(apiEndpoint) .path(SsoService.class) .path(SsoService.class, "unregisterToken") .build(token) .toString()) .useDeleteMethod() .addQueryParam("clienturl", clientUrl) .request(); } catch (ApiException | IOException e) { LOG.warn(e.getLocalizedMessage()); } } @Inject  HttpSsoServerClient(
      @Named("che.api") String apiEndpoint, HttpJsonRequestFactory requestFactory); @Override Subject getSubject(String token, String clientUrl); @Override void unregisterClient(String token, String clientUrl);  }
@Test public void shouldUnregisterClient() throws Exception { ssoClient.unregisterClient("token123", CLIENT_URL); verify(requestFactory) .fromUrl( eq( UriBuilder.fromUri(API_ENDPOINT) .path(SsoService.class) .path(SsoService.class, "unregisterToken") .build("token123") .toString())); verify(request).addQueryParam(eq("clienturl"), eq(CLIENT_URL)); verify(request).useDeleteMethod(); verify(request).request(); verifyNoMoreInteractions(request); }