@SneakyThrows
    private String resolveTemplate(Configuration cfg, String template, Map<String, Object> data) {
        Template temp = cfg.getTemplate(template);

        @Cleanup
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        @Cleanup
        Writer out = new OutputStreamWriter(byteArrayOutputStream, StandardCharsets.UTF_8);
        temp.process(data, out);

        return new String(byteArrayOutputStream.toByteArray(), StandardCharsets.UTF_8);
    }
Add a listener in the format {@code host:port} and a {@link Supplier} for the advertised listener.
Host from listener will be included as a network alias.
<p>
Use it to register additional connections to the Kafka broker from outside the container network
<p>
The listener will be added to the list of default listeners.
<p>
Default listeners:
<ul>
    <li>0.0.0.0:9092</li>
    <li>0.0.0.0:9093</li>
</ul>
<p>
The {@link Supplier} will be added to the list of default advertised listeners.
<p>
Default advertised listeners:
<ul>
     <li>{@code container.getConfig().getHostName():9092}</li>
     <li>{@code container.getHost():container.getMappedPort(9093)}</li>
</ul>
@param listener a supplier that will provide a listener
@param advertisedListener a supplier that will provide a listener
@return this {@link RedpandaContainer} instance
modules/redpanda/src/main/java/org/testcontainers/redpanda/RedpandaContainer.java