In some classes (e.g. Message) a main-method is used to perform unit-tests. These should be extracted from the code to a JUnit-Test.