@Test
public void connect_disabled() throws Exception {

  when(mockRealDriver.connect(any(String.class), any(Properties.class)))
      .thenReturn(mockRealConnection);
  Properties properties =
      new Properties() {
        {
          put("stackdriver.trace.enabled", "false");
        }
      };
  Connection conn =
      driver.connect("jdbc:stackdriver:mockdriver?user=root&password=123456", properties);
  conn.close();
  assertThat(conn).isNotNull();
  InOrder inOrder = inOrder(mockTraceService, mockRealDriver, mockRealConnection);
  inOrder.verify(mockRealDriver).connect("jdbc:mockdriver?user=root&password=123456", properties);
  inOrder.verify(mockRealConnection).close();
  verifyNoMoreInteractions(
      mockTraceService, mockRealDriver, mockRealConnection); // No trace span created.
}