@Test
    public void shouldStartWhenContainerIpIsUsedInWaitStrategy() {
        try (
            final YugabyteDBYCQLContainer ycqlContainer = new YugabyteDBYCQLContainer(IMAGE_NAME_2_18)
                .withUsername("cassandra")
                .withPassword("cassandra")
        ) {
            ycqlContainer.start();
            boolean isQueryExecuted = performQuery(ycqlContainer, "SELECT release_version FROM system.local")
                .wasApplied();
            assertThat(isQueryExecuted).isTrue();
        }
    }
YugabyteDB YCQL API unit test class
modules/yugabytedb/src/test/java/org/testcontainers/junit/yugabytedb/YugabyteDBYCQLTest.java