GithubOAuthProviderConfiguration extends AbstractOAuthProviderConfiguration { @Override public String getLogoutUrl(HttpServletRequest request) { return getBaseUrl(request) + contextPath + LOGOUT_URL; } GithubOAuthProviderConfiguration(
      @Value("${github.oauth2.resource.userInfoUri}") String githubUserInfoEndpointUrl,
      @Value("${github.oauth2.client.clientId}") String githubClientId,
      @Value("${server.contextPath}") String contextPath); @Override String getFilterProcessingUrl(); @Bean @ConfigurationProperties("github.oauth2.client") AuthorizationCodeResourceDetails github(); @Override String getLogoutUrl(HttpServletRequest request); @Override String getLogoHref();  }
@Test public void contextStringTestSlash() { when(mockRequest.getRequestURI()).thenReturn("/"); when(mockRequest.getRequestURL()).thenReturn(new StringBuffer("https: GithubOAuthProviderConfiguration configuration = new GithubOAuthProviderConfiguration(null, null, "/"); String result = configuration.getLogoutUrl(mockRequest); assertEquals("https: }
@Test public void contextStringTestRepository() { when(mockRequest.getRequestURI()).thenReturn("/repository"); when(mockRequest.getRequestURL()).thenReturn(new StringBuffer("https: GithubOAuthProviderConfiguration configuration = new GithubOAuthProviderConfiguration(null, null, "/repository"); String result = configuration.getLogoutUrl(mockRequest); assertEquals("https: }