ServiceProviderEndpoints { public RequestMatcher getRequestMatcher() { return new OrRequestMatcher(requestMatchers(defaultFailureURL, ssoProcessingURL, ssoHoKProcessingURL, discoveryProcessingURL, idpSelectionPageURL, ssoLoginURL, metadataURL, defaultTargetURL, logoutURL, singleLogoutURL)); }  RequestMatcher getRequestMatcher();  }
@Test public void matchers() throws Exception { ServiceProviderEndpoints endpoints = new ServiceProviderEndpoints(); endpoints.setDefaultFailureURL("/failure"); endpoints.setIdpSelectionPageURL("/idp"); endpoints.setSsoLoginURL("/login"); endpoints.setDiscoveryProcessingURL("/discovery"); endpoints.setDefaultTargetURL("/default"); endpoints.setLogoutURL("/logout"); endpoints.setMetadataURL("/metadata"); endpoints.setSingleLogoutURL("/slo"); endpoints.setSsoHoKProcessingURL("/hok"); endpoints.setSsoProcessingURL("/sso"); RequestMatcher matcher = endpoints.getRequestMatcher(); assertThat(matcher.matches(mockRequest("/failure"))).isTrue(); assertThat(matcher.matches(mockRequest("/idp"))).isTrue(); assertThat(matcher.matches(mockRequest("/login"))).isTrue(); assertThat(matcher.matches(mockRequest("/discovery"))).isTrue(); assertThat(matcher.matches(mockRequest("/default"))).isTrue(); assertThat(matcher.matches(mockRequest("/logout"))).isTrue(); assertThat(matcher.matches(mockRequest("/metadata"))).isTrue(); assertThat(matcher.matches(mockRequest("/slo"))).isTrue(); assertThat(matcher.matches(mockRequest("/hok"))).isTrue(); assertThat(matcher.matches(mockRequest("/sso"))).isTrue(); assertThat(matcher.matches(mockRequest("/sanity-check"))).isFalse(); }