@Override
    public Properties beforeAll() {
        Assumptions.assumeTrue(DockerClientFactory.instance().isDockerAvailable(), "Docker not enabled");

        container = new KafkaContainer("apache/kafka:3.8.1");

        container.start();

        String brokerUrl = container.getBootstrapServers();

        createTopics(brokerUrl);

        TEST_STREAM = new TestStream(brokerUrl);
        TEST_STREAM.start();

        Properties properties = new Properties();
        properties.setProperty("BROKER_URL", brokerUrl);
        System.getProperties().putAll(properties);
        return properties;
    }
Copy of https://github.com/chbatey/kafka-unit/blob/master/src/main/java/info/batey/kafka/unit/KafkaUnit.java
Some codes have been modified for testing from the copied code.
agent-module/plugins-it/kafka-it/kafka-3-it/src/test/java/test/pinpoint/plugin/kafka/KafkaStreamsUnitServer.java