Code example for Connection

Methods: closeunwrap

0
    } 
 
    public void testDefault() throws Exception { 
        Connection conn = dataSource.getConnection();
 
        MockConnection mockConn = conn.unwrap(MockConnection.class);
 
        Assert.assertEquals("select 123", mockConn.getLastSql());
 
        conn.close();
    } 
 
} 
Contextual code suggestions in your IDE  Get Codota for Java