Unit tests for connection manager