### Question:
SecurityServiceImpl extends RemoteServiceServlet implements SecurityService { @Override public boolean saveSettings(GUISecuritySettings settings) throws ServerException { Session session = ServiceUtil.checkMenu(getThreadLocalRequest(), Menu.SECURITY); boolean restartRequired = false; try { ContextProperties conf = Context.get().getProperties(); if (session.getTenantId() == Tenant.DEFAULT_ID) { conf.setProperty("password.ttl", Integer.toString(settings.getPwdExpiration())); conf.setProperty("login.ignorecase", Boolean.toString(settings.isIgnoreLoginCase())); conf.setProperty("ssl.required", Boolean.toString(settings.isForceSsl())); conf.setProperty("security.acceptsid", Boolean.toString(settings.isAllowSidInRequest())); try { ServletContext context = getServletContext(); String policy = "true".equals(conf.getProperty("ssl.required")) ? "CONFIDENTIAL" : "NONE"; WebConfigurator configurator = new WebConfigurator(context.getRealPath("/WEB-INF/web.xml")); restartRequired = configurator.setTransportGuarantee(policy); } catch (Throwable t) { log.error(t.getMessage()); } } conf.setProperty(session.getTenantName() + ".password.size", Integer.toString(settings.getPwdSize())); conf.setProperty(session.getTenantName() + ".gui.savelogin", Boolean.toString(settings.isSaveLogin())); conf.setProperty(session.getTenantName() + ".anonymous.enabled", Boolean.toString(settings.isEnableAnonymousLogin())); conf.setProperty(session.getTenantName() + ".anonymous.key", settings.getAnonymousKey().trim()); if (settings.getAnonymousUser() != null) conf.setProperty(session.getTenantName() + ".anonymous.user", settings.getAnonymousUser().getUsername()); conf.write(); log.info("Security settings data written successfully."); return restartRequired; } catch (Throwable e) { return (Boolean) ServiceUtil.throwServerException(session, log, e); } }  static GUITenant getTenant(long tenantId); static GUITenant fromTenant(Tenant tenant); static GUITenant getTenant(String tenantName); GUISession loadSession(Session sess, String locale); @Override GUISession getSession(String locale); @Override void logout(); @Override int changePassword(Long requestorUserId, long userId, String oldPassword, String newPassword,
			boolean notify); @Override void addUserToGroup(long groupId, long userId); @Override void deleteGroup(long groupId); @Override void deleteUser(long userId); @Override GUIGroup getGroup(long groupId); @Override GUIUser getUser(long userId); @Override void removeFromGroup(long groupId, long[] userIds); @Override GUIGroup saveGroup(GUIGroup group); @Override GUIUser saveUser(GUIUser user, GUIInfo info); @Override GUIUser saveProfile(GUIUser user); @Override GUIUser saveInterfaceSettings(GUIUser user); @Override void kill(String sid); @Override GUISecuritySettings loadSettings(); @Override boolean saveSettings(GUISecuritySettings settings); @Override void applyRights(GUIMenu menu); @Override GUIMenu getMenu(long menuId); @Override GUIUser[] searchUsers(String username, String groupId); @Override GUISequence[] loadBlockedEntities(); @Override void removeBlockedEntities(long[] ids); @Override void replicateUsersSettings(long masterUserId, Long[] userIds, boolean gui, boolean groups);  }### Answer:
@Test public void testSaveSettings() throws ServerException { GUISecuritySettings securitySettings = new GUISecuritySettings(); securitySettings.setPwdExpiration(30); securitySettings.setPwdSize(6); securitySettings.setAnonymousKey("xxx"); service.saveSettings(securitySettings); }