msg callback and unit tests for Connector