CAPX-87: Improved connection test performance.

CAPX-87: Improved connection test performance.

Created testQuery() method on profiles lib to query for one random profile.