I have two Services, A and B, which communicates between each other through SQS. I want to cower the service A with end-to-end tests. I invoke some action in this service, and as an answer, it must post a message to SQS. The problem is that I cannot retrieve this message in the test because the service B has subscribed on them and read them before I invoke "get message from SQS". Two more problems: I cannot stop the service B and I cannot change the service A (for example, writing a message to a log right before posting it to SQS)
How can I solve this?