@AfterEach
    public void teardown() throws Exception {
        if (server != null)
            this.server.close();
        if (selector != null)
            this.selector.close();
    }
Tests for the Sasl authenticator. These use a test harness that runs a simple socket server that echos back responses.
clients/src/test/java/org/apache/kafka/common/security/authenticator/SaslAuthenticatorTest.java