fix unit-tests for connection-handling