some refactoring, added test for MessageProcessorFactory