Fix the order for Consumer argument invocation in itermessages
Use unittest.mock if available.  Closes #381