configHolder.setFilterByUntranslated(true);
configHolder.setFilterByApproved(true);
configHolder.setFilterByRejected(true);
configHolder.setFilterByHasError(true);
HistoryToken historyToken = new HistoryToken();
when(history.getHistoryToken()).thenReturn(historyToken);
presenter
.onUserConfigChanged(UserConfigChangeEvent.EDITOR_CONFIG_CHANGE_EVENT);
verify(display).setTranslatedFilter(
configHolder.getState().isFilterByTranslated());
verify(display).setNeedReviewFilter(
configHolder.getState().isFilterByFuzzy());
verify(display).setUntranslatedFilter(
configHolder.getState().isFilterByUntranslated());
verify(display).setApprovedFilter(
configHolder.getState().isFilterByApproved());
verify(display).setRejectedFilter(
configHolder.getState().isFilterByRejected());
verify(display).setHasErrorFilter(
configHolder.getState().isFilterByHasError());
assertThat(
historyToken.isFilterTranslated(),
Matchers.equalTo(configHolder.getState().isFilterByTranslated()));
assertThat(historyToken.isFilterFuzzy(),
Matchers.equalTo(configHolder.getState().isFilterByFuzzy()));
assertThat(historyToken.isFilterUntranslated(),
Matchers.equalTo(configHolder.getState()
.isFilterByUntranslated()));
assertThat(historyToken.isFilterApproved(),
Matchers.equalTo(configHolder.getState().isFilterByApproved()));
assertThat(historyToken.isFilterRejected(),
Matchers.equalTo(configHolder.getState().isFilterByRejected()));
assertThat(historyToken.isFilterHasError(),
Matchers.equalTo(configHolder.getState().isFilterByHasError()));
}