@Test public void updates_with_all_group_states_missing() { DecryptedGroup currentState = state(6); ServerGroupLogEntry log7 = logEntryMissingState(7); ServerGroupLogEntry log8 = logEntryMissingState(8); ServerGroupLogEntry log9 = logEntryMissingState(9); AdvanceGroupStateResult advanceGroupStateResult = GroupStateMapper.partiallyAdvanceGroupState(new GlobalGroupState(currentState, asList(log7, log8, log9)), LATEST); assertThat(advanceGroupStateResult.getProcessedLogEntries(), is(asList(asLocal(serverLogEntry(7)), asLocal(serverLogEntry(8)), asLocal(serverLogEntry(9))))); assertNewState(new GlobalGroupState(state(9), emptyList()), advanceGroupStateResult.getNewGlobalGroupState()); assertEquals(state(9), 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();   }