Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
sending and/or blocking messages should be delegate to a dedicated component. your state machines should always call that dedicated component, and then transparently the component will decide if it should send message imediatly or store it to send a combined message later.
@SimonCrase, I know the existing codebase for working on it for two years. The code coverage is good. But the tests are written after the code and I want to switch to TDD.