@Test
public void connect_fails() throws Exception {

  when(mockRealDriver.connect(eq("jdbc:mockdriver"), any(Properties.class)))
      .thenThrow(new SQLException());
  Properties info = new Properties();
  try {
    driver.connect("jdbc:stackdriver:mockdriver", info);
    fail("expected SQLException");
  } catch (SQLException expected) {
  }
  InOrder inOrder = inOrder(mockTraceService, mockTraceSpan, mockRealDriver);
  inOrder.verify(mockTraceService).open("JDBC.Driver#connect");
  inOrder.verify(mockTraceSpan).annotate(Label.DATABASE_URL, Optional.of("jdbc:mockdriver"));
  inOrder.verify(mockRealDriver).connect("jdbc:mockdriver", info);
  inOrder.verify(mockTraceSpan).close();
}