Added publish tests for ReplicationSubscriber

In addition, I cleaned up useless parenthesis as suggested by new IDEA plugin and refactored MessageMatcher to make easier to use and maintain.