### Question:
View { public <D extends MaybeDocument> DocumentChanges computeDocChanges( ImmutableSortedMap<DocumentKey, D> docChanges) { return computeDocChanges(docChanges, null); } View(Query query, ImmutableSortedSet<DocumentKey> remoteDocuments); SyncState getSyncState(); DocumentChanges computeDocChanges(
      ImmutableSortedMap<DocumentKey, D> docChanges); DocumentChanges computeDocChanges(
      ImmutableSortedMap<DocumentKey, D> docChanges, @Nullable DocumentChanges previousChanges); ViewChange applyChanges(DocumentChanges docChanges); ViewChange applyChanges(DocumentChanges docChanges, TargetChange targetChange); ViewChange applyOnlineStateChange(OnlineState onlineState);  }### Answer:
@Test public void testRemembersLocalMutationsFromPreviousCallToComputeChanges() { Query query = messageQuery().limitToFirst(2); Document doc1 = doc("rooms/eros/messages/0", 0, map()); Document doc2 = doc("rooms/eros/messages/1", 0, map(), Document.DocumentState.LOCAL_MUTATIONS); View view = new View(query, DocumentKey.emptyKeySet()); View.DocumentChanges changes = view.computeDocChanges(docUpdates(doc1, doc2)); assertEquals(keySet(doc2.getKey()), changes.mutatedKeys); Document doc3 = doc("rooms/eros/messages/2", 0, map()); changes = view.computeDocChanges(docUpdates(doc3), changes); assertEquals(keySet(doc2.getKey()), changes.mutatedKeys); }