@Test
    public void testWithAdditionalUrlParamInJdbcUrl() {
        try (
            final YugabyteDBYSQLContainer ysqlContainer = new YugabyteDBYSQLContainer(YBDB_TEST_IMAGE)
                .withUrlParam("sslmode", "disable")
                .withUrlParam("application_name", "yugabyte")
        ) {
            ysqlContainer.start();
            String jdbcUrl = ysqlContainer.getJdbcUrl();
            assertThat(jdbcUrl)
                .contains("?")
                .contains("&")
                .contains("sslmode=disable")
                .contains("application_name=yugabyte")
                .as("A JDBC connection string with additional parameter validation succeeds");
        }
    }
YugabyteDB YSQL API unit test class
modules/yugabytedb/src/test/java/org/testcontainers/junit/yugabytedb/YugabyteDBYSQLTest.java