added assertions to check if expected messages have been received