test: Test connection behavior about messages from the backend correctly