@Test
    void verifySamlResponseForUnsolicitedRequest() throws Throwable {
        val request = buildHttpRequest();
        val response = new MockHttpServletResponse();

        val service = getSamlRegisteredServiceForTestShib(false, false);
        val adaptor = SamlRegisteredServiceMetadataAdaptor.get(samlRegisteredServiceCachingMetadataResolver,
            service, service.getServiceId()).orElseThrow();

        val authnRequest = getAuthnRequestFor(service);
        val extensions = samlProfileSamlResponseBuilder.newSamlObject(Extensions.class);
        val requesterID = samlProfileSamlResponseBuilder.newSamlObject(RequesterID.class);
        requesterID.setURI(casProperties.getAuthn().getSamlIdp().getCore().getEntityId());
        extensions.getUnknownXMLObjects().add(requesterID);
        authnRequest.setExtensions(extensions);
        val assertion = getAssertion();
        val samlResponse = buildResponse(request, response, service,
            adaptor, authnRequest, assertion, SAMLConstants.SAML2_POST_BINDING_URI);
        assertNotNull(samlResponse);
        assertNull(samlResponse.getInResponseTo());
        val subject = samlResponse.getAssertions().getFirst().getSubject();
        val subjectConfirmation = subject.getSubjectConfirmations().getFirst();
        assertNull(subjectConfirmation.getSubjectConfirmationData().getInResponseTo());
    }
This is {@link SamlProfileSaml2ResponseBuilderTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-saml-idp/src/test/java/org/apereo/cas/support/saml/web/idp/profile/builders/response/SamlProfileSaml2ResponseBuilderTests.java