@Test
void testCreateSubsegmentWithSql() {

    expectedSqlParams = new HashMap<>();
    expectedSqlParams.put("url", URL);
    expectedSqlParams.put("user", USER);
    expectedSqlParams.put("driver_version", DRIVER_VERSION);
    expectedSqlParams.put("database_type", DB_TYPE);
    expectedSqlParams.put("database_version", DB_VERSION);
    expectedSqlParams.put("sanitized_query", SQL);
    Subsegment sub = SqlSubsegments.forQuery(connection, SQL);
    assertThat(sub.getName()).isEqualTo(CATALOG + "@" + HOST);
    assertThat(sub.getNamespace()).isEqualTo(Namespace.REMOTE.toString());
    assertThat(sub.getSql()).containsAllEntriesOf(expectedSqlParams);
}