@Test
public void connect() throws Exception {

  when(mockRealDriver.connect(any(String.class), any(Properties.class)))
      .thenReturn(mockRealConnection);
  Properties properties = new Properties();
  Connection conn =
      driver.connect("jdbc:stackdriver:mockdriver?user=root&password=123456", properties);
  conn.close();
  assertThat(conn).isNotNull();
  InOrder inOrder = inOrder(mockTraceService, mockTraceSpan, mockRealDriver, mockRealConnection);
  inOrder.verify(mockTraceService).open("JDBC.Driver#connect");
  inOrder
      .verify(mockTraceSpan)
      .annotate(Label.DATABASE_URL, Optional.of("jdbc:mockdriver?<...>"));
  inOrder.verify(mockRealDriver).connect("jdbc:mockdriver?user=root&password=123456", properties);
  inOrder.verify(mockTraceSpan).close();
  inOrder.verify(mockRealConnection).close();
  verifyNoMoreInteractions(mockTraceService, mockTraceSpan, mockRealDriver, mockRealConnection);
}