Added test cases for msgbuffer functionality.