@AfterEach
    public void cleanUp() {
        if (streamInstanceOne != null) {
            streamInstanceOne.close();
        }
        if (streamInstanceTwo != null) {
            streamInstanceTwo.close();
        }
        if (streamInstanceOneRecovery != null) {
            streamInstanceOneRecovery.close();
        }
    }
An integration test to verify the conversion of a dirty-closed EOS
task towards a standby task is safe across restarts of the application.
streams/src/test/java/org/apache/kafka/streams/integration/StandbyTaskEOSIntegrationTest.java