@@ -0,0 +1,3081 @@
+package com.couchbase.lite;%0A%0Aimport com.couchbase.litecore.C4Error;%0Aimport com.couchbase.litecore.C4ReplicatorStatus;%0A%0Aimport org.junit.Test;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0A%0Apublic class ReplicatorMiscTest extends BaseReplicatorTest %7B%0A%0A    @Test%0A    public void testReplicatorChange() %7B%0A        String docID = %22someDocumentID%22;%0A        long completed = 10;%0A        long total = 20;%0A        int errorCode = CBLError.Code.CBLErrorBusy;%0A        int errorDomain = 1; // CBLError.Domain.CBLErrorDomain: LiteCoreDomain%0A        C4ReplicatorStatus c4ReplicatorStatus = new C4ReplicatorStatus(%0A                AbstractReplicator.ActivityLevel.CONNECTING.getValue(),%0A                completed,%0A                total,%0A                1,%0A                errorDomain,%0A                errorCode,%0A                0%0A        );%0A        Replicator.Status status = new Replicator.Status(c4ReplicatorStatus);%0A        ReplicatorChange repChange = new ReplicatorChange(repl, status);%0A%0A        assertEquals(repChange.getReplicator(), repl);%0A        assertEquals(repChange.getStatus(), status);%0A        assertEquals(repChange.getStatus().getActivityLevel(), status.getActivityLevel());%0A        assertEquals(repChange.getStatus().getProgress().getCompleted(), completed);%0A        assertEquals(repChange.getStatus().getProgress().getTotal(), total);%0A        assertEquals(repChange.getStatus().getError().getCode(), errorCode);%0A        assertEquals(repChange.getStatus().getError().getDomain(), CBLError.Domain.CBLErrorDomain);%0A        String changeInString = %22ReplicatorChange%7B%22 +%0A                %22replicator=%22 + repl +%0A                %22, status=%22 + status +  '%7D';%0A        assertEquals(repChange.toString(), changeInString);%0A    %7D%0A%0A    @Test%0A    public void testDocumentReplication() %7B%0A        boolean isPush = true;%0A        List%3CReplicatedDocument%3E docs = new ArrayList%3C%3E();%0A        DocumentReplication doc = new DocumentReplication(repl, isPush, docs);%0A        assertEquals(doc.isPush(), isPush);%0A        assertEquals(doc.getReplicator(), repl);%0A        assertEquals(doc.getDocuments(), docs);%0A    %7D%0A%0A    @Test%0A    public void testReplicatedDocument() %7B%0A        String docID = %22someDocumentID%22;%0A        int flags = C4DocumentFlags.kDocDeleted;%0A        C4Error error = new C4Error(1, CBLError.Code.CBLErrorBusy, 0);%0A        ReplicatedDocument doc = new ReplicatedDocument(docID, flags, error, true);%0A%0A        assertEquals(doc.getID(), docID);%0A        assertTrue(doc.flags().contains(DocumentFlag.DocumentFlagsDeleted));%0A        assertEquals(doc.getError().getDomain(), CBLError.Domain.CBLErrorDomain);%0A        assertEquals(doc.getError().getCode(),  CBLError.Code.CBLErrorBusy);%0A%0A        String replicatedDocumentInString = %22ReplicatedDocument %7B%22 +%0A                %22, document id =%22 + docID +%0A                %22, error code =%22 + error.getCode()+%0A                %22, error domain=%22 + error.getDomain() +%0A                '%7D';%0A        assertEquals(doc.toString(), replicatedDocumentInString);%0A    %7D%0A%7D%0A

add misc replicator tests (#1858)