@Test
public void onLogoutSuccess_WithService_ServiceAsQueryParameterValue()
        throws IOException, ServletException {

    ServiceProperties serviceProperties = new ServiceProperties();
    serviceProperties.setService("http://localhost/john/wick?foo=a&bar=b");
    CasLogoutSuccessHandler logoutSuccessHandler = new CasLogoutSuccessHandler(casLogout, serviceProperties);
    logoutSuccessHandler.onLogoutSuccess(request, response, null);
    String service = encode(serviceProperties.getService(), UTF_8.toString());
    assertThat(response.getRedirectedUrl())
            .isEqualTo(casLogout.toASCIIString() + "?service=" + service);
}