private void consume() {
            final String string = new String(buffer.toByteArray(), StandardCharsets.UTF_8);
            final byte[] bytes = processAnsiColorCodes(string).getBytes(StandardCharsets.UTF_8);
            consumer.accept(new OutputFrame(type, bytes));
            buffer.reset();
        }
@return a {@link CountDownLatch} that may be used to wait until {@link #close()} has been called.
core/src/main/java/org/testcontainers/containers/output/FrameConsumerResultCallback.java