@Test
    public void testSmoke() throws SQLException {
        try (
            // creatingYSQLContainer {
            final YugabyteDBYSQLContainer ysqlContainer = new YugabyteDBYSQLContainer(
                "yugabytedb/yugabyte:2.14.4.0-b26"
            )
            // }
        ) {
            // startingYSQLContainer {
            ysqlContainer.start();
            // }
            assertThat(performQuery(ysqlContainer, "SELECT 1").getInt(1))
                .as("A sample test query succeeds")
                .isEqualTo(1);
        }
    }
YugabyteDB YSQL API unit test class
modules/yugabytedb/src/test/java/org/testcontainers/junit/yugabytedb/YugabyteDBYSQLTest.java