### Question:
WorkbenchConfigurationPopup extends BaseModal { @PostConstruct public void setup() { languageListItemsLabel.setText( constants.Language() ); setLanguageListItems(); preferencesService.call( new RemoteCallback<UserWorkbenchPreferences>() { @Override public void callback( final UserWorkbenchPreferences response ) { if ( response != null ) { languageListItems.setSelectItemByText( languageMap.get( response.getLanguage() ) ); refresh( response.getLanguage(), response ); } } } ).loadUserPreferences( new UserWorkbenchPreferences( "default" ) ); } @Inject  WorkbenchConfigurationPopup( final PlaceManager placeManager,
                                        final PerspectiveManager perspectiveManager,
                                        final Caller<UserPreferencesService> preferencesService ); @PostConstruct void setup(); void onOk();  }### Answer:
@Test public void testSetupLanguageSelector() { final ArgumentCaptor<Pair> localesCaptor = ArgumentCaptor.forClass( Pair.class ); popup.setup(); verify( popup.languageListItems, times( locales.length ) ).addItem( localesCaptor.capture() ); final List<Pair> capturedLocales = localesCaptor.getAllValues(); assertEquals( locales.length, capturedLocales.size() ); for ( String locale : locales ) { assertTrue( "Locale '" + locale + "' was not setup.", isLocaleCaptured( locale, capturedLocales ) ); } }