Added unit tests for chatConnection.