While trying to find a bug in encapsulating and decapsulating messages, added a test case.