add tests for connection