@Test
    void verifyStrictTransport() {
        val id = UUID.randomUUID().toString();
        val filter = getFilterForProperty(id, RegisteredServiceProperties.HTTP_HEADER_ENABLE_STRICT_TRANSPORT_SECURITY);
        filter.setStrictTransportSecurityHeader("max-age=1");
        val response = new MockHttpServletResponse();
        val request = new MockHttpServletRequest();
        request.addParameter(CasProtocolConstants.PARAMETER_SERVICE, id);
        request.setSecure(true);
        filter.doFilter(request, response, new MockFilterChain());
        val header = response.getHeader("Strict-Transport-Security");
        assertEquals("max-age=1", header);
    }
This is {@link RegisteredServiceResponseHeadersEnforcementFilterTests}.

@author Misagh Moayyed
@since 5.3.0
core/cas-server-core-web/src/test/java/org/apereo/cas/web/RegisteredServiceResponseHeadersEnforcementFilterTests.java