test to receive from message queue

refactor into methods