Everything that goes over the communication must implement the interface Message. Yes, I know it is empty. This is an example of the [Marker Interface pattern](http://en.wikipedia.org/wiki/Marker_interface_pattern). The purpose of implementing the interface is to demonstrate the purpose of the class even though it doesn't require any specific functionality.
Given that, things are a little more complex for us. For consistency, we want all Messages to adhere to these criteria:
1. The name number end in "Message"
1. The class must implement both Serializable and Message (both for marking purposes)
1. The class must be in the communication.messages package in the GameShared project
1. The class must contain a toString that returns the name of the class, a colon, and the instance variables it contains.
1. There is a getter for each instance variable
In addition, we should try to meet these objectives:
1. All instance variables are set by the constructor
Given these criteria, there are two ways Messages get tested. First, there is a MessageStructureVerifierTest in the communication.messages package. That test will find all of the other classes in the package, verify that each implements Serializable and Message interfaces, and verify that there is an appropriate getter for each non-transient/final field (using is... for booleans and get... for all other types).
Given MessageStructureVerifierTest, new Message classes only require one test that verifies that its toString method and its getters work. So, the test classes for methods look like this:
```java
packagecommunication.messages;
importstaticorg.junit.Assert.assertEquals;
importorg.junit.Test;
/**
* Tests a login message
* @author merlin
*
*/
publicclassLoginMessageTest
{
/**
* Make sure its toString is correct
*/
@Test
publicvoidtestToString()
{
LoginMessagemsg=newLoginMessage("fred","xxx");
assertEquals("Login Message: userName = fred and password = xxx",msg.toString());