@AfterEach
    public void tearDown() {
        testDriver.close();
    }
This is code sample in docs/streams/developer-guide/testing.html
streams/examples/src/test/java/org/apache/kafka/streams/examples/docs/DeveloperGuideTesting.java