### Question:
SettingServiceImpl extends RemoteServiceServlet implements SettingService { @Override public void saveSettings(GUIParameter[] settings) throws ServerException { Session session = ServiceUtil.checkMenu(getThreadLocalRequest(), Menu.ADMINISTRATION); try { int counter = 0; ContextProperties conf = Context.get().getProperties(); for (int i = 0; i < settings.length; i++) { if (settings[i] == null || StringUtils.isEmpty(settings[i].getName())) continue; conf.setProperty(settings[i].getName(), settings[i].getValue() != null ? settings[i].getValue() : ""); counter++; } conf.write(); log.info("Successfully saved {} parameters", counter); } catch (Throwable e) { ServiceUtil.throwServerException(session, log, e); } }  @Override GUIEmailSettings loadEmailSettings(); @Override void saveEmailSettings(GUIEmailSettings settings); @Override GUIParameter[] loadSettings(); @Override GUIParameter[] loadClientSettings(); @Override void saveSettings(GUIParameter[] settings); @Override void saveStorageSettings(GUIParameter[] settings); @Override GUIParameter[] loadSettingsByNames(String[] names); @Override GUIParameter[] loadGUISettings(); @Override boolean testEmail(String email); @Override boolean testStorage(int id); @Override void saveRegistration(String name, String email, String organization, String website); @Override GUIParameter[] loadConverterParameters(String converter); @Override void saveExtensionAliases(String extension, String aliases);  }### Answer:
@Test public void testSaveSettings() throws ServerException { GUIParameter[] params = new GUIParameter[50]; for (int i = 0; i < params.length; i++) { GUIParameter p = new GUIParameter("param" + i + "_name", "Value " + i); params[i] = p; } service.saveSettings(params); }
@Test public void testSaveWSSettings() throws ServerException { GUIParameter[] settings = new GUIParameter[2]; GUIParameter wsSettings = new GUIParameter(); wsSettings.setName("webservice.enabled"); wsSettings.setValue("true"); GUIParameter wdSettings = new GUIParameter(); wsSettings.setName("webdav.enabled"); wsSettings.setValue("true"); settings[0] = wsSettings; settings[1] = wdSettings; service.saveSettings(settings); }