add tests for message counter functionality