added connected tests.
refactoring and adding ReplicaSetConnection.