@Test
    public void test() throws IOException, InterruptedException {
        CountDownLatch latch = new CountDownLatch(1);

        try (
            GenericContainer<?> container = new GenericContainer<>(TestImages.TINY_IMAGE)
                .withCommand("true")
                .withStartupCheckStrategy(new OneShotStartupCheckStrategy())
        ) {
            container.start();
            String createdAt = container.getContainerInfo().getCreated();

            // Request all events between startTime and endTime for the container
            try (
                EventsResultCallback response = DockerClientFactory
                    .instance()
                    .client()
                    .eventsCmd()
                    .withContainerFilter(container.getContainerId())
                    .withEventFilter("create")
                    .withSince(Instant.parse(createdAt).getEpochSecond() + "")
                    .exec(
                        new EventsResultCallback() {
                            @Override
                            public void onNext(@NotNull Event event) {
                                // Check that a create event for the container is received
                                if (
                                    event.getId().equals(container.getContainerId()) &&
                                    event.getStatus().equals("create")
                                ) {
                                    latch.countDown();
                                }
                            }
                        }
                    )
            ) {
                response.awaitStarted(5, TimeUnit.SECONDS);
                latch.await(5, TimeUnit.SECONDS);
            }
        }
    }
Test that docker events can be streamed from the client.
core/src/test/java/org/testcontainers/dockerclient/EventStreamTest.java