Additional logging and enhanced junit tests for ConnectionManager