@Test
    void verifyNoSignAuthnRequest() {
        val service = new SamlRegisteredService();
        service.setServiceId(UUID.randomUUID().toString());
        service.setName("SAML2Service");
        servicesManager.save(service);

        val request = new MockHttpServletRequest();
        val authnRequest = getAuthnRequestFor(service.getServiceId());

        val adaptor = mock(SamlRegisteredServiceMetadataAdaptor.class);
        when(adaptor.isAuthnRequestsSigned()).thenReturn(true);
        val context = new MessageContext();
        context.setMessage(authnRequest);
        assertThrows(SAMLException.class,
            () -> controller.verifyAuthenticationContextSignature(context, request, authnRequest, adaptor, service));
    }
This is {@link SamlIdPProfileHandlerControllerTests}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-saml-idp/src/test/java/org/apereo/cas/support/saml/web/idp/profile/SamlIdPProfileHandlerControllerTests.java