when(connectionAcquiringStrategy.getConnection(connectionRequestContextArgumentCaptor.capture()))
.thenReturn(connection);
verify(connection, never()).getMetaData();
flexyPoolDataSource.getConnection("username", "password").getMetaData();
verify(connection, times(1)).getMetaData();
Credentials credentials = connectionRequestContextArgumentCaptor.getValue().getCredentials();
assertEquals("username", credentials.getUsername());
assertEquals("password", credentials.getPassword());
verify(overallConnectionAcquireTimer, times(1)).update(anyLong(), eq(TimeUnit.MILLISECONDS));
verify(concurrentConnectionRequestCountHistogram, times(1)).update(1);
verify(concurrentConnectionRequestCountHistogram, times(1)).update(0);
}