@Operation(summary = "Redirect with SAML artifact")
    @GetMapping(value = {"/frontchannel/saml/v4/redirect_with_artifact", "/frontchannel/saml/v4/idp/redirect_with_artifact"})
    public RedirectView redirectWithArtifact(@RequestParam(value = "SAMLart") String artifact, HttpServletRequest request) throws SamlSessionException, UnsupportedEncodingException {
        logger.info("Receive redirect with SAML artifact");
        return new RedirectView(assertionConsumerServiceUrlService.generateRedirectUrl(artifact, null, request.getRequestedSessionId(), null));
    }
@Test
    void redirectWithArtifactTest() throws SamlSessionException, UnsupportedEncodingException {
        String redirectUrl = "redirectUrl";
        httpServletRequestMock.setRequestedSessionId("sessionId");
        when(assertionConsumerServiceUrlServiceMock.generateRedirectUrl(anyString(), any(), anyString(), any())).thenReturn(redirectUrl);

        RedirectView result = artifactController.redirectWithArtifact("artifact", httpServletRequestMock);

        assertNotNull(result);
        assertEquals(redirectUrl, result.getUrl());
        verify(assertionConsumerServiceUrlServiceMock, times(1)).generateRedirectUrl(anyString(), any(), anyString(), any());
    }