Add a junit testcase for messages instances and visitor