verify(timer, times(1)).update(anyLong(), eq(TimeUnit.MILLISECONDS));
}
@Test
public void testGetConnectionWithCredentials() throws SQLException {
ConnectionRequestContext connectionRequestContext = new ConnectionRequestContext.Builder()
.setCredentials(new Credentials("username", "password")).build();
when(dataSource.getConnection(eq("username"), eq("password"))).thenReturn(connection);
assertSame(connection, poolAdapter.getConnection(connectionRequestContext));
verify(timer, times(1)).update(anyLong(), eq(TimeUnit.MILLISECONDS));
}