@Test
void testUnwrap() throws SQLException {

    Assertions.assertSame(connection, connection.unwrap(Connection.class));
    Assertions.assertSame(connection, connection.unwrap(TracingConnection.class));
    Assertions.assertSame(delegate, connection.unwrap(OtherWrapper.class));
    Assertions.assertSame(delegate, connection.unwrap(ExtraInterface.class));
    boolean exceptionThrown = false;
    try {
        connection.unwrap(Long.class);
    } catch (final SQLException e) {
        exceptionThrown = true;
    }
    Assertions.assertTrue(exceptionThrown);
    verify(delegate, never()).unwrap(Connection.class);
    verify(delegate, never()).unwrap(TracingConnection.class);
    verify(delegate).unwrap(OtherWrapper.class);
    verify(delegate).unwrap(ExtraInterface.class);
    verify(delegate).unwrap(Long.class);
}