Add tests to messageSystem and resourceSystem