@Test public void no_repair_change_is_posted_if_the_local_state_is_a_placeholder() { DecryptedGroup currentState = DecryptedGroup.newBuilder() .setRevision(GroupStateMapper.PLACEHOLDER_REVISION) .setTitle("Incorrect group title, Revision " + 6) .build(); ServerGroupLogEntry log6 = serverLogEntry(6); AdvanceGroupStateResult advanceGroupStateResult = GroupStateMapper.partiallyAdvanceGroupState(new GlobalGroupState(currentState, singletonList(log6)), LATEST); assertThat(advanceGroupStateResult.getProcessedLogEntries(), is(singletonList(asLocal(log6)))); assertTrue(advanceGroupStateResult.getNewGlobalGroupState().getServerHistory().isEmpty()); assertEquals(log6.getGroup(), advanceGroupStateResult.getNewGlobalGroupState().getLocalState()); }
static @NonNull AdvanceGroupStateResult partiallyAdvanceGroupState(@NonNull GlobalGroupState inputState, int maximumRevisionToApply) { AdvanceGroupStateResult groupStateResult = processChanges(inputState, maximumRevisionToApply); return cleanDuplicatedChanges(groupStateResult, inputState.getLocalState()); }
GroupStateMapper { static @NonNull AdvanceGroupStateResult partiallyAdvanceGroupState(@NonNull GlobalGroupState inputState, int maximumRevisionToApply) { AdvanceGroupStateResult groupStateResult = processChanges(inputState, maximumRevisionToApply); return cleanDuplicatedChanges(groupStateResult, inputState.getLocalState()); } }
GroupStateMapper { static @NonNull AdvanceGroupStateResult partiallyAdvanceGroupState(@NonNull GlobalGroupState inputState, int maximumRevisionToApply) { AdvanceGroupStateResult groupStateResult = processChanges(inputState, maximumRevisionToApply); return cleanDuplicatedChanges(groupStateResult, inputState.getLocalState()); } private  GroupStateMapper(); }
GroupStateMapper { static @NonNull AdvanceGroupStateResult partiallyAdvanceGroupState(@NonNull GlobalGroupState inputState, int maximumRevisionToApply) { AdvanceGroupStateResult groupStateResult = processChanges(inputState, maximumRevisionToApply); return cleanDuplicatedChanges(groupStateResult, inputState.getLocalState()); } private  GroupStateMapper();  }
GroupStateMapper { static @NonNull AdvanceGroupStateResult partiallyAdvanceGroupState(@NonNull GlobalGroupState inputState, int maximumRevisionToApply) { AdvanceGroupStateResult groupStateResult = processChanges(inputState, maximumRevisionToApply); return cleanDuplicatedChanges(groupStateResult, inputState.getLocalState()); } private  GroupStateMapper();   }