@Test
    void verifyOperation() throws Throwable {
        casTomcatEmbeddedServletContainerCustomizer.customize(casServletWebServerFactory);
        val server = casServletWebServerFactory.getWebServer();
        try {
            val tomcatServer = (TomcatWebServer) server;
            tomcatServer.start();
            val cluster = (SimpleTcpCluster) tomcatServer.getTomcat().getEngine().getCluster();
            val channel = (GroupChannel) cluster.getChannel();
            val membership = channel.getMembershipService();
            assertInstanceOf(McastService.class, membership);

            val givenRemoteUser = UUID.randomUUID().toString();
            val response = HttpUtils.execute(HttpExecutionRequest.builder()
                .method(HttpMethod.GET)
                .headers(Map.of("REMOTE_USER", givenRemoteUser))
                .url("http://localhost:%s/custom".formatted(port))
                .build());
            val responseHeader = response.getHeader("X-Remote-User");
            assertNotNull(responseHeader);
            val remoteUser = responseHeader.getValue();
            assertEquals(givenRemoteUser, remoteUser);
        } finally {
            server.stop();
        }
    }
This is {@link CasTomcatServletWebServerFactoryClusterTests}.

@author Hal Deadman
@since 6.2.0
webapp/cas-server-webapp-init-tomcat/src/test/java/org/apereo/cas/tomcat/CasTomcatServletWebServerFactoryClusterTests.java