added tests for connection