// Path: spring-security-cas-extension/src/main/java/com/kakawait/spring/security/cas/LaxServiceProperties.java
// public class LaxServiceProperties extends ServiceProperties {
// 
//     private final boolean dynamicServiceResolution;
// 
//     public LaxServiceProperties() {
//         this(true);
//     }
// 
//     public LaxServiceProperties(boolean dynamicServiceResolution) {
//         this.dynamicServiceResolution = dynamicServiceResolution;
//     }
// 
//     @Override
//     public void afterPropertiesSet() {
//         if (!dynamicServiceResolution) {
//             try {
//                 super.afterPropertiesSet();
//             } catch (RuntimeException e) {
//                 throw e;
//             } catch (Exception e) {
//                 // Old version of spring security throw Exception for afterPropertiesSet()
//                 throw new RuntimeException(e);
//             }
//         } else {
//             Assert.hasLength(getArtifactParameter(), "artifactParameter cannot be empty.");
//             Assert.hasLength(getServiceParameter(), "serviceParameter cannot be empty.");
//         }
//     }
// 
//     public boolean isDynamicServiceResolution() {
//         return dynamicServiceResolution;
//     }
// }


import com.kakawait.spring.security.cas.LaxServiceProperties;
import org.junit.Before;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import java.io.IOException;
import java.net.URI;
import javax.servlet.ServletException;
import static java.net.URLEncoder.encode;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.assertj.core.api.Assertions.assertThat;
package com.kakawait.spring.security.cas.web.authentication;





/**
 * @author Thibaud Leprêtre
 */
public class RequestAwareCasLogoutSuccessHandlerTest {

    private static final URI casLogout = URI.create("http://cas.server/cas/logout");

    private MockHttpServletRequest request;

    private MockHttpServletResponse response;

    @Before
    public void setUp() {
        request = new MockHttpServletRequest();
        response = new MockHttpServletResponse();
    }

    @Test
    public void onLogoutSuccess_WithService_UseHttpServletRequestAsService()
            throws IOException, ServletException {
// Path: spring-security-cas-extension/src/main/java/com/kakawait/spring/security/cas/LaxServiceProperties.java
// public class LaxServiceProperties extends ServiceProperties {
// 
//     private final boolean dynamicServiceResolution;
// 
//     public LaxServiceProperties() {
//         this(true);
//     }
// 
//     public LaxServiceProperties(boolean dynamicServiceResolution) {
//         this.dynamicServiceResolution = dynamicServiceResolution;
//     }
// 
//     @Override
//     public void afterPropertiesSet() {
//         if (!dynamicServiceResolution) {
//             try {
//                 super.afterPropertiesSet();
//             } catch (RuntimeException e) {
//                 throw e;
//             } catch (Exception e) {
//                 // Old version of spring security throw Exception for afterPropertiesSet()
//                 throw new RuntimeException(e);
//             }
//         } else {
//             Assert.hasLength(getArtifactParameter(), "artifactParameter cannot be empty.");
//             Assert.hasLength(getServiceParameter(), "serviceParameter cannot be empty.");
//         }
//     }
// 
//     public boolean isDynamicServiceResolution() {
//         return dynamicServiceResolution;
//     }
// }


// Path: spring-security-cas-extension/src/test/java/com/kakawait/spring/security/cas/web/authentication/RequestAwareCasLogoutSuccessHandlerTest.java
import com.kakawait.spring.security.cas.LaxServiceProperties;
import org.junit.Before;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import java.io.IOException;
import java.net.URI;
import javax.servlet.ServletException;
import static java.net.URLEncoder.encode;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.assertj.core.api.Assertions.assertThat;

package com.kakawait.spring.security.cas.web.authentication;





/**
 * @author Thibaud Leprêtre
 */
public class RequestAwareCasLogoutSuccessHandlerTest {

    private static final URI casLogout = URI.create("http://cas.server/cas/logout");

    private MockHttpServletRequest request;

    private MockHttpServletResponse response;

    @Before
    public void setUp() {
        request = new MockHttpServletRequest();
        response = new MockHttpServletResponse();
    }

    @Test
    public void onLogoutSuccess_WithService_UseHttpServletRequestAsService()
            throws IOException, ServletException {
        LaxServiceProperties serviceProperties = new LaxServiceProperties();