Add tests for Replica