ArgumentCaptor<AsyncCallback> callbackCaptor =
ArgumentCaptor.forClass(AsyncCallback.class);
verify(dispatcher).execute(actionCaptor.capture(),
callbackCaptor.capture());
SaveOptionsAction action = actionCaptor.getValue();
int docListSize =
Integer.parseInt(action.getConfigurationMap().get(
DocumentListPageSize));
int editorSize =
Integer.parseInt(action.getConfigurationMap().get(
EditorPageSize));
boolean showError =
Boolean.parseBoolean(action.getConfigurationMap().get(
ShowErrors));
boolean displayButton =
Boolean.parseBoolean(action.getConfigurationMap().get(
DisplayButtons));
assertThat(docListSize, Matchers.equalTo(1000));
assertThat(editorSize, Matchers.equalTo(2000));
assertThat(displayButton, Matchers.equalTo(false));