@Test(timeout = 60_000L)
    public void testLogConsumer() throws TimeoutException {
        WaitingConsumer waitingConsumer = new WaitingConsumer();
        Slf4jLogConsumer logConsumer = new Slf4jLogConsumer(LOGGER);

        Consumer<OutputFrame> composedConsumer = logConsumer.andThen(waitingConsumer);
        container.followOutput(composedConsumer);

        waitingConsumer.waitUntil(frame -> {
            return frame.getType() == OutputFrame.OutputType.STDOUT && frame.getUtf8String().contains("seq=2");
        });
    }
Simple test for following container output.
core/src/test/java/org/testcontainers/junit/OutputStreamTest.java