@Test
    public void testInitScript() throws SQLException {
        try (
            final YugabyteDBYSQLContainer ysqlContainer = new YugabyteDBYSQLContainer(YBDB_TEST_IMAGE)
                .withInitScript("init/init_yql.sql")
        ) {
            ysqlContainer.start();
            assertThat(performQuery(ysqlContainer, "SELECT greet FROM dsql").getString(1))
                .as("A record match succeeds")
                .isEqualTo("Hello DSQL");
        }
    }
YugabyteDB YSQL API unit test class
modules/yugabytedb/src/test/java/org/testcontainers/junit/yugabytedb/YugabyteDBYSQLTest.java