@Test
public void buildDetails_WithUri_DefaultProxyCallbackAndServiceAuthenticationDetails() {

    ServiceProperties serviceProperties = new LaxServiceProperties();
    ProxyCallbackAndServiceAuthenticationDetailsSource authenticationDetailsSource =
            new ProxyCallbackAndServiceAuthenticationDetailsSource(serviceProperties, URI.create("/cas/callback"));
    MockHttpServletRequest context = new MockHttpServletRequest();
    ServiceAuthenticationDetails serviceAuthenticationDetails = authenticationDetailsSource.buildDetails(context);
    assertThat(serviceAuthenticationDetails)
            .isInstanceOf(DefaultProxyCallbackAndServiceAuthenticationDetails.class);
    assertThat(serviceAuthenticationDetails.getServiceUrl()).isEqualTo("http://localhost");
    assertThat(((ProxyCallbackAndServiceAuthenticationDetails) serviceAuthenticationDetails).getProxyCallbackUrl())
            .isEqualTo("http://localhost/cas/callback");
}