add tests for replica