Added a unit test to test replication behavior.