@Test
    void verifyOptionForUnknownService() {
        val id = UUID.randomUUID().toString();
        val filter = getFilterForProperty(id, Pair.of(RegisteredServiceProperties.HTTP_HEADER_ENABLE_XCONTENT_OPTIONS, "false"));
        filter.setEnableXContentTypeOptions(true);
        val response = new MockHttpServletResponse();
        val request = new MockHttpServletRequest();
        request.addParameter(CasProtocolConstants.PARAMETER_SERVICE, "unknown-123456");
        assertDoesNotThrow(() -> filter.doFilter(request, response, new MockFilterChain()));
        assertEquals(HttpStatus.SC_FORBIDDEN, response.getStatus());
    }
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