Add unit tests about message processing