connection bugfixes and acceptance tests
unit tests for connections