added ReplicationMessage and some unit tests